composefetcher

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimePrecisionOffset = -1 * time.Second
	DefaultFetchLimit   = 50
	Kind                = "compose"
)
View Source
const (
	DeploymentScaleMembersEvent = "deployment.scale.members"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposeClient

type ComposeClient interface {
	GetAuditEvents(params composeapi.AuditEventsParams) (*[]composeapi.AuditEvent, []error)
}

type ComposeEventFetcher

type ComposeEventFetcher struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*ComposeEventFetcher, error)

New creates a new EventFetcher for fetching compose events

func (*ComposeEventFetcher) FetchEvents

func (e *ComposeEventFetcher) FetchEvents(ctx context.Context, lastEvent *eventio.RawEvent) ([]eventio.RawEvent, error)

func (*ComposeEventFetcher) Kind

func (e *ComposeEventFetcher) Kind() string

type Config

type Config struct {
	// Logger overrides the default logger
	Logger lager.Logger
	// APIKey sets the API for querying events
	APIKey string
	// Client overrides the default compose client
	Client ComposeClient
	// FetchLimit sets the batch size for each http request
	FetchLimit int
}

Jump to

Keyboard shortcuts

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