bridgeservice

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeService

type BridgeService interface {
	ExtractAgent(ctx context.Context, channelID string) (*fleetpb.AgentInfoRes, error)
	GetPolicyName(ctx context.Context, policyId, ownerId string) (*policiespb.PolicyRes, error)
	GetDataSetsFromAgentGroups(ctx context.Context, mfOwnerId string, agentGroupIds []string) (map[string]string, error)
	NotifyActiveSink(ctx context.Context, mfOwnerId, sinkId, state, message string) error
	GetSinkIdsFromPolicyID(ctx context.Context, mfOwnerId string, policyID string) (map[string]string, error)
	IncreamentMessageCounter(publisher, subtopic, channel, protocol string)
}

type SinkerOtelBridgeService

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

func NewBridgeService

func NewBridgeService(logger *zap.Logger,
	defaultCacheExpiration time.Duration,
	sinkActivity producer.SinkActivityProducer,
	policiesClient policiespb.PolicyServiceClient,
	sinksClient sinkspb.SinkServiceClient,
	fleetClient fleetpb.FleetServiceClient, messageInputCounter metrics.Counter) SinkerOtelBridgeService

func (*SinkerOtelBridgeService) ExtractAgent

func (bs *SinkerOtelBridgeService) ExtractAgent(ctx context.Context, channelID string) (*fleetpb.AgentInfoRes, error)

ExtractAgent retrieve agent info from fleet, or cache

func (*SinkerOtelBridgeService) GetPolicyName added in v0.26.0

func (bs *SinkerOtelBridgeService) GetPolicyName(ctx context.Context, policyId, ownerID string) (*policiespb.PolicyRes, error)

GetPolicyName retrieve policy info from policies service, or cache.

func (*SinkerOtelBridgeService) GetSinkIdsFromDatasetIDs

func (bs *SinkerOtelBridgeService) GetSinkIdsFromDatasetIDs(ctx context.Context, mfOwnerId string, datasetIDs []string) (map[string]string, error)

GetSinkIdsFromDatasetIDs retrieve sink_ids from datasets from policies service, or cache

func (*SinkerOtelBridgeService) IncrementMessageCounter added in v0.26.0

func (bs *SinkerOtelBridgeService) IncrementMessageCounter(publisher, subtopic, channel, protocol string)

IncrementMessageCounter add to our metrics the number of messages received

func (*SinkerOtelBridgeService) NotifyActiveSink

func (bs *SinkerOtelBridgeService) NotifyActiveSink(ctx context.Context, mfOwnerId, sinkId, size string) error

NotifyActiveSink notify the sinker that a sink is active

Jump to

Keyboard shortcuts

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