Documentation ¶
Overview ¶
Package extensions provides extension functionality to GAPIS.
Extensions would ideally be plugins, but golang still doesn't have cross platform support. See: https://github.com/golang/go/issues/19282
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventFilter ¶ added in v0.9.0
EventFilter is a predicate used for filtering event commands. If the function returns true then the command is considered for event generation, otherwise it is ignored.
type EventProvider ¶ added in v0.6.1
type EventProvider func(ctx context.Context, id api.CmdID, cmd api.Cmd, s *api.GlobalState) []*service.Event
EventProvider is a function that produces events for the given command and state.
type Extension ¶
type Extension struct { // Name of the extension. Name string // AdjustContexts lets the extension rename or reprioritize the list of // contexts. AdjustContexts func(context.Context, []*api.ContextInfo) // Custom command groupers. CmdGroupers func(ctx context.Context, p *path.CommandTree, r *path.ResolveConfig) []cmdgrouper.Grouper // Custom events provider. Events func(ctx context.Context, p *path.Events, r *path.ResolveConfig) EventProvider // Custom events filters. EventFilter func(ctx context.Context, p *path.Events, r *path.ResolveConfig) EventFilter }
Extension is a GAPIS extension. It should be registered at application initialization with Register.
Click to show internal directories.
Click to hide internal directories.