Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
Aggregator manages converging multiple streams into one.
func NewAggregator ¶
func NewAggregator(c GatewayClient, shardID string, l *log.Logger) *Aggregator
NewAggregator configures and returns a new Aggregator.
func (*Aggregator) Add ¶
func (a *Aggregator) Add(r Resource)
Add adds a new source ID to the aggregator. This is called by the orchestrator.
func (*Aggregator) Consume ¶
func (a *Aggregator) Consume() <-chan interface{}
Consume returns a channel from which a client can read from the aggregated stream.
func (*Aggregator) List ¶
func (a *Aggregator) List() []interface{}
List returns the current list of stream IDs being aggregated. This is called by the orchestrator.
func (*Aggregator) Remove ¶
func (a *Aggregator) Remove(id string)
Remove removes an existing source ID from the aggregator. This is called by the orchestrator.
type Communicator ¶
type Communicator struct{}
func (Communicator) Add ¶
func (a Communicator) Add(ctx context.Context, worker, task interface{}) error
type GatewayClient ¶
type GatewayClient interface {
Stream(ctx context.Context, req *loggregator_v2.EgressBatchRequest) loggregator.EnvelopeStream
}
GatewayClient is the interface used to open a new stream with the logs provider gateway.
type Orchestrator ¶
type Orchestrator interface { NextTerm(ctx context.Context) UpdateTasks([]orchestrator.Task) }
type SingleOrSpaceProvider ¶
type SingleOrSpaceProvider struct { Source string ApiAddr string SpaceGuid string IncludeServices bool // contains filtered or unexported fields }
func NewSingleOrSpaceProvider ¶
func NewSingleOrSpaceProvider( sourceID string, apiAddr string, spaceID string, includeServices bool, opts ...SingleOrSpaceProviderOption, ) *SingleOrSpaceProvider
func (*SingleOrSpaceProvider) Resources ¶
func (s *SingleOrSpaceProvider) Resources() ([]Resource, error)
type SingleOrSpaceProviderOption ¶
type SingleOrSpaceProviderOption func(*SingleOrSpaceProvider)
func WithSourceProviderClient ¶
func WithSourceProviderClient(httpClient Getter) SingleOrSpaceProviderOption
func WithSourceProviderSpaceExcludeFilter ¶
func WithSourceProviderSpaceExcludeFilter(excludeFilter SourceIDFilter) SingleOrSpaceProviderOption
type SourceIDFilter ¶
SourceIDFilter returns true if the passed source id should be filtered from the space list from CAPI
type SourceManager ¶
type SourceManager struct {
// contains filtered or unexported fields
}
func NewSourceManager ¶
func NewSourceManager(s SourceProvider, o Orchestrator, interval time.Duration) *SourceManager
func (*SourceManager) Start ¶
func (s *SourceManager) Start()