cf

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Meta

func Meta(
	ctx context.Context,
	cli plugin.CliConnection,
	tailer Tailer,
	args []string,
	c HTTPClient,
	log Logger,
	tableWriter io.Writer,
	mopts ...MetaOption,
)

Meta returns the metadata from Log Cache

func Tail

func Tail(
	ctx context.Context,
	cli plugin.CliConnection,
	args []string,
	c HTTPClient,
	log Logger,
	w io.Writer,
	opts ...TailOption,
)

Tail will fetch the logs for a given application guid and write them to stdout.

Types

type Command

type Command func(ctx context.Context, cli plugin.CliConnection, args []string, c HTTPClient, log Logger, w io.Writer)

Command is the interface to implement plugin commands

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the client used for HTTP requests

type Logger

type Logger interface {
	Fatalf(format string, args ...interface{})
	Printf(format string, args ...interface{})
}

Logger is used for outputting log-cache results and errors

type MetaOption

type MetaOption func(*optionsFlags)

func WithMetaNoHeaders

func WithMetaNoHeaders() MetaOption

type TailOption

type TailOption func(*options)

func WithTailNoHeaders

func WithTailNoHeaders() TailOption

type Tailer

type Tailer func(sourceID string, start, end time.Time) []string

Tailer defines our interface for querying Log Cache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL