Documentation ¶
Overview ¶
Package remote implements a remote Tagger.
Index ¶
- type Options
- type Tagger
- func (t *Tagger) AccumulateTagsFor(entityID string, cardinality collectors.TagCardinality, ...) error
- func (t *Tagger) GetEntity(entityID string) (*types.Entity, error)
- func (t *Tagger) List(cardinality collectors.TagCardinality) tagger_api.TaggerListResponse
- func (t *Tagger) Standard(entityID string) ([]string, error)
- func (t *Tagger) Start(ctx context.Context) error
- func (t *Tagger) Stop() error
- func (t *Tagger) Subscribe(cardinality collectors.TagCardinality) chan []types.EntityEvent
- func (t *Tagger) Tag(entityID string, cardinality collectors.TagCardinality) ([]string, error)
- func (t *Tagger) Unsubscribe(ch chan []types.EntityEvent)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
Options contains the options needed to configure the remote tagger.
func CLCRunnerOptions ¶
func CLCRunnerOptions(config configComponent.Component) (Options, error)
CLCRunnerOptions returns the tagger options used in the CLC Runner.
func NodeAgentOptions ¶
func NodeAgentOptions(config configComponent.Component) (Options, error)
NodeAgentOptions returns the tagger options used in the node agent.
func NodeAgentOptionsForSecruityResolvers ¶
NodeAgentOptionsForSecruityResolvers is a legacy function that returns the same options as NodeAgentOptions, but it's used by the tag security resolvers only TODO (component): remove this function once the security resolver migrates to component
type Tagger ¶
type Tagger struct {
// contains filtered or unexported fields
}
Tagger holds a connection to a remote tagger, processes incoming events from it, and manages the storage of entities to allow querying.
func NewTagger ¶
NewTagger returns an allocated tagger. You still have to run Init() once the config package is ready.
func (*Tagger) AccumulateTagsFor ¶
func (t *Tagger) AccumulateTagsFor(entityID string, cardinality collectors.TagCardinality, tb tagset.TagsAccumulator) error
AccumulateTagsFor returns tags for a given entity at the desired cardinality.
func (*Tagger) GetEntity ¶
GetEntity returns the entity corresponding to the specified id and an error
func (*Tagger) List ¶
func (t *Tagger) List(cardinality collectors.TagCardinality) tagger_api.TaggerListResponse
List returns all the entities currently stored by the tagger.
func (*Tagger) Start ¶
Start creates the connection to the remote tagger and starts watching for events.
func (*Tagger) Subscribe ¶
func (t *Tagger) Subscribe(cardinality collectors.TagCardinality) chan []types.EntityEvent
Subscribe returns a channel that receives a slice of events whenever an entity is added, modified or deleted. It can send an initial burst of events only to the new subscriber, without notifying all of the others.
func (*Tagger) Tag ¶
func (t *Tagger) Tag(entityID string, cardinality collectors.TagCardinality) ([]string, error)
Tag returns tags for a given entity at the desired cardinality.
func (*Tagger) Unsubscribe ¶
func (t *Tagger) Unsubscribe(ch chan []types.EntityEvent)
Unsubscribe ends a subscription to entity events and closes its channel.