Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultScheduleDelay is how long events should delay before generating. DefaultScheduleDelay = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContentGenerator ¶
type ContentGenerator struct {
// ResponseFactory is a function that generates a content response.
ResponseFactory func(ctx context.Context, path, prefix, namespace string, opts module.ContentOptions) (component.ContentResponse, error)
// Path is the path to the content.
Path string
// Prefix the API path prefix. It could be prepended to the path to create
// a resolvable path.
Prefix string
// Namespace is the current namespace.
Namespace string
// LabelSet is a label set to filter any content.
LabelSet *labels.Set
// RunEvery is how often the event generator should be run.
RunEvery time.Duration
// contains filtered or unexported fields
}
ContentGenerator generates content events.
func (*ContentGenerator) IsRunning ¶
func (g *ContentGenerator) IsRunning() bool
IsRunning returns true if content is being generated.
func (*ContentGenerator) Name ¶
func (*ContentGenerator) Name() string
Name returns the name of this generator.
func (*ContentGenerator) ScheduleDelay ¶
func (g *ContentGenerator) ScheduleDelay() time.Duration
ScheduleDelay returns how long to delay before running this generator again.
type NamespacesGenerator ¶
type NamespacesGenerator struct {
// NamespaceClient is a namespaces client.
NamespaceClient cluster.NamespaceInterface
}
NamespacesGenerator generates namespaces events.
func (NamespacesGenerator) Name ¶
func (NamespacesGenerator) Name() string
Name returns the generator's name.
func (NamespacesGenerator) ScheduleDelay ¶
func (NamespacesGenerator) ScheduleDelay() time.Duration
ScheduleDelay returns how long to delay before running this generator again.
type NavigationGenerator ¶
NavigationGenerator generates navigation events.
func (NavigationGenerator) Name ¶
func (NavigationGenerator) Name() string
Name return the name of this generator.
func (*NavigationGenerator) ScheduleDelay ¶
func (g *NavigationGenerator) ScheduleDelay() time.Duration
ScheduleDelay returns how long to delay before running this generator again.
Click to show internal directories.
Click to hide internal directories.