Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorConfig ¶
type CollectorConfig struct {
Logger *zap.Logger
FlowCache *cache.FlowCache
Stats *stream.Stats
K8sClient collector.K8sClientGetter
CiliumNamespaces []string
TlsAuthProps *tls.AuthProperties
IPFIXCollectorPort string
OVNKNamespace string
}
CollectorConfig holds configuration for determining and creating flow collectors.
type CollectorFactory ¶
CollectorFactory creates flow collectors.
func DetectFlowCollector ¶
func DetectFlowCollector(ctx context.Context, config CollectorConfig) (pb.FlowCollector, string, CollectorFactory)
DetectFlowCollector determines which flow collector is available and returns its type, name, and factory. Detection happens once at startup in main.go.
type FlowCollectorStreamFactory ¶
type FlowCollectorStreamFactory struct {
Factory CollectorFactory
CollectorName string // e.g., "Cilium", "OVN-K", "Falco"
}
FlowCollectorStreamFactory wraps a CollectorFactory to implement StreamClientFactory. This allows flow collectors to be managed by the stream manager like other streams.
func (*FlowCollectorStreamFactory) Name ¶
func (f *FlowCollectorStreamFactory) Name() string
Name returns the stream name for logging.
func (*FlowCollectorStreamFactory) NewStreamClient ¶
func (f *FlowCollectorStreamFactory) NewStreamClient(ctx context.Context, _ grpc.ClientConnInterface) (stream.StreamClient, error)
NewStreamClient creates a flow collector and wraps it as a StreamClient.
type FlowSinkAdapter ¶
FlowSinkAdapter adapts cache.FlowCache and Stats to implement the collector.FlowSink interface.
func NewFlowSinkAdapter ¶
func NewFlowSinkAdapter(flowCache *cache.FlowCache, stats *stream.Stats) *FlowSinkAdapter
NewFlowSinkAdapter creates a new FlowSink adapter.
func (*FlowSinkAdapter) IncrementFlowsReceived ¶
func (f *FlowSinkAdapter) IncrementFlowsReceived()
IncrementFlowsReceived increments the flows received counter.
type KubernetesNetworkFlowsStream ¶
type KubernetesNetworkFlowsStream interface {
Send(req *pb.SendKubernetesNetworkFlowsRequest) error
Recv() (*pb.SendKubernetesNetworkFlowsResponse, error)
}
KubernetesNetworkFlowsStream abstracts the SendKubernetesNetworkFlows gRPC stream.
type NetworkFlowsFactory ¶
type NetworkFlowsFactory struct {
Logger *zap.Logger
FlowCache *cache.FlowCache
Stats *stream.Stats
}
NetworkFlowsFactory creates network flows stream clients for sending flows to CloudSecure.
func (*NetworkFlowsFactory) Name ¶
func (f *NetworkFlowsFactory) Name() string
Name returns the stream name for logging.
func (*NetworkFlowsFactory) NewStreamClient ¶
func (f *NetworkFlowsFactory) NewStreamClient(ctx context.Context, grpcConn grpc.ClientConnInterface) (stream.StreamClient, error)
NewStreamClient creates a new network flows stream client.