groupmanager

package
v0.0.0-...-0ad2128 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	groupName string,
	ticker <-chan time.Time,
	gp GroupProvider,
	gu GroupUpdater,
	opts ...GroupManagerOption,
)

Start creates and starts a Manager.

Types

type GroupManagerOption

type GroupManagerOption func(*Manager)

func WithMetrics

func WithMetrics(metrics metrics) GroupManagerOption

type GroupProvider

type GroupProvider interface {
	SourceIDs() []string
}

GroupProvider returns the desired SourceIDs.

type GroupUpdater

type GroupUpdater interface {
	// SetShardGroup adds source IDs to the LogCache sub-groups.
	SetShardGroup(ctx context.Context, name string, sourceIDs ...string) error
}

GroupUpdater is used to add (and keep alive) the source IDs for a group.

type Manager

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

Manager syncs the source IDs from the GroupProvider with the GroupUpdater. It does so at the configured interval.

Jump to

Keyboard shortcuts

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