Documentation
¶
Overview ¶
nolint:revive // ignore unused parameter alerts, dummy methods
Index ¶
- Constants
- func SplitListenAddr(arg string) (string, string, error)
- type FakeObserver
- func (f *FakeObserver) AddTracingPolicy(ctx context.Context, tp tracingpolicy.TracingPolicy) error
- func (h *FakeObserver) ConfigureTracingPolicy(_ context.Context, _ *tetragon.ConfigureTracingPolicyRequest) error
- func (f *FakeObserver) DeleteTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error
- func (f *FakeObserver) DisableTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error
- func (f *FakeObserver) EnableTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error
- func (h *FakeObserver) ListDomains(_ context.Context) (*tetragon.ListDomainsResponse, error)
- func (f *FakeObserver) ListTracingPolicies(ctx context.Context, domain string) (*tetragon.ListTracingPoliciesResponse, error)
- func (f *FakeObserver) RemoveSensor(ctx context.Context, sensorName string) error
- type GRPCTracingPolicy
- type Listener
- type ListenerFunc
- type Notifier
- type Server
- func (s *Server) AddTracingPolicy(ctx context.Context, req *tetragon.AddTracingPolicyRequest) (*tetragon.AddTracingPolicyResponse, error)
- func (s *Server) ConfigureTracingPolicy(ctx context.Context, req *tetragon.ConfigureTracingPolicyRequest) (*tetragon.ConfigureTracingPolicyResponse, error)
- func (s *Server) DeleteTracingPolicy(ctx context.Context, req *tetragon.DeleteTracingPolicyRequest) (*tetragon.DeleteTracingPolicyResponse, error)
- func (s *Server) DisableSensor(_ context.Context, req *tetragon.DisableSensorRequest) (*tetragon.DisableSensorResponse, error)
- func (s *Server) DisableTracingPolicy(ctx context.Context, req *tetragon.DisableTracingPolicyRequest) (*tetragon.DisableTracingPolicyResponse, error)
- func (s *Server) EnableSensor(_ context.Context, req *tetragon.EnableSensorRequest) (*tetragon.EnableSensorResponse, error)
- func (s *Server) EnableTracingPolicy(ctx context.Context, req *tetragon.EnableTracingPolicyRequest) (*tetragon.EnableTracingPolicyResponse, error)
- func (s *Server) GetDebug(_ context.Context, req *tetragon.GetDebugRequest) (*tetragon.GetDebugResponse, error)
- func (s *Server) GetEvents(request *tetragon.GetEventsRequest, ...) error
- func (s *Server) GetEventsListener(request *tetragon.GetEventsRequest, ...) (ListenerFunc, error)
- func (s *Server) GetHealth(_ context.Context, request *tetragon.GetHealthStatusRequest) (*tetragon.GetHealthStatusResponse, error)
- func (s *Server) GetInfo(_ context.Context, _ *tetragon.GetInfoRequest) (*tetragon.GetInfoResponse, error)
- func (s *Server) GetVersion(_ context.Context, _ *tetragon.GetVersionRequest) (*tetragon.GetVersionResponse, error)
- func (s *Server) ListDomains(ctx context.Context, _ *tetragon.ListDomainsRequest) (*tetragon.ListDomainsResponse, error)
- func (s *Server) ListSensors(_ context.Context, _ *tetragon.ListSensorsRequest) (*tetragon.ListSensorsResponse, error)
- func (s *Server) ListTracingPolicies(ctx context.Context, req *tetragon.ListTracingPoliciesRequest) (*tetragon.ListTracingPoliciesResponse, error)
- func (s *Server) RemoveSensor(_ context.Context, req *tetragon.RemoveSensorRequest) (*tetragon.RemoveSensorResponse, error)
- func (s *Server) RuntimeHook(ctx context.Context, req *tetragon.RuntimeHookRequest) (*tetragon.RuntimeHookResponse, error)
- func (s *Server) SetDebug(_ context.Context, req *tetragon.SetDebugRequest) (*tetragon.SetDebugResponse, error)
Constants ¶
const GrpcDomain = "grpc"
Variables ¶
This section is empty.
Functions ¶
func SplitListenAddr ¶ added in v0.10.0
splitListenAddr splits the user-provided address a to a proto and an address field to be used with net.Listen.
addresses can be:
unix://absolute_path for unix sockets <host>:<port> for TCP (more specifically, an address that can be passed to net.Listen)
Note that the client (tetra) uses https://github.com/grpc/grpc-go/blob/v1.51.0/clientconn.go#L135 With the syntax is documented in https://github.com/grpc/grpc/blob/master/doc/naming.md. The server uses net.Listen. And so the two are not compatible because the client expects "ipv4" or "ipv6" for tcp connections. Hence, because we want the same string to work the same way both on the client and the server, we only support the two addresses above.
Types ¶
type FakeObserver ¶ added in v0.9.0
type FakeObserver struct{}
func (*FakeObserver) AddTracingPolicy ¶ added in v0.9.0
func (f *FakeObserver) AddTracingPolicy(ctx context.Context, tp tracingpolicy.TracingPolicy) error
func (*FakeObserver) ConfigureTracingPolicy ¶ added in v1.4.0
func (h *FakeObserver) ConfigureTracingPolicy(_ context.Context, _ *tetragon.ConfigureTracingPolicyRequest) error
func (*FakeObserver) DeleteTracingPolicy ¶ added in v0.11.0
func (*FakeObserver) DisableTracingPolicy ¶ added in v1.0.0
func (*FakeObserver) EnableTracingPolicy ¶ added in v1.0.0
func (*FakeObserver) ListDomains ¶ added in v1.8.0
func (h *FakeObserver) ListDomains(_ context.Context) (*tetragon.ListDomainsResponse, error)
func (*FakeObserver) ListTracingPolicies ¶ added in v0.9.0
func (f *FakeObserver) ListTracingPolicies(ctx context.Context, domain string) (*tetragon.ListTracingPoliciesResponse, error)
func (*FakeObserver) RemoveSensor ¶ added in v0.9.0
func (f *FakeObserver) RemoveSensor(ctx context.Context, sensorName string) error
type GRPCTracingPolicy ¶ added in v1.8.0
type GRPCTracingPolicy struct {
tracingpolicy.TracingPolicy
Domain string
}
func (*GRPCTracingPolicy) TpDomain ¶ added in v1.8.0
func (gtp *GRPCTracingPolicy) TpDomain() string
type Listener ¶
type Listener interface {
Notify(res *tetragon.GetEventsResponse)
}
type ListenerFunc ¶ added in v1.8.0
type ListenerFunc func() error
ListenerFunc is the event-loop function returned by GetEventsListener. It blocks until the event loop terminates, returning nil on graceful shutdown or an error if the loop exits unexpectedly.
type Notifier ¶ added in v1.2.1
type Notifier interface {
AddListener(listener Listener)
RemoveListener(listener Listener)
NotifyListener(original any, processed *tetragon.GetEventsResponse)
}
type Server ¶
type Server struct {
tetragon.UnimplementedFineGuidanceSensorsServer
// contains filtered or unexported fields
}
func (*Server) AddTracingPolicy ¶
func (s *Server) AddTracingPolicy(ctx context.Context, req *tetragon.AddTracingPolicyRequest) (*tetragon.AddTracingPolicyResponse, error)
func (*Server) ConfigureTracingPolicy ¶ added in v1.4.0
func (s *Server) ConfigureTracingPolicy(ctx context.Context, req *tetragon.ConfigureTracingPolicyRequest) (*tetragon.ConfigureTracingPolicyResponse, error)
func (*Server) DeleteTracingPolicy ¶ added in v0.11.0
func (s *Server) DeleteTracingPolicy(ctx context.Context, req *tetragon.DeleteTracingPolicyRequest) (*tetragon.DeleteTracingPolicyResponse, error)
func (*Server) DisableSensor ¶
func (s *Server) DisableSensor(_ context.Context, req *tetragon.DisableSensorRequest) (*tetragon.DisableSensorResponse, error)
func (*Server) DisableTracingPolicy ¶ added in v1.0.0
func (s *Server) DisableTracingPolicy(ctx context.Context, req *tetragon.DisableTracingPolicyRequest) (*tetragon.DisableTracingPolicyResponse, error)
func (*Server) EnableSensor ¶
func (s *Server) EnableSensor(_ context.Context, req *tetragon.EnableSensorRequest) (*tetragon.EnableSensorResponse, error)
func (*Server) EnableTracingPolicy ¶ added in v1.0.0
func (s *Server) EnableTracingPolicy(ctx context.Context, req *tetragon.EnableTracingPolicyRequest) (*tetragon.EnableTracingPolicyResponse, error)
func (*Server) GetDebug ¶ added in v1.2.0
func (s *Server) GetDebug(_ context.Context, req *tetragon.GetDebugRequest) (*tetragon.GetDebugResponse, error)
func (*Server) GetEvents ¶
func (s *Server) GetEvents(request *tetragon.GetEventsRequest, server tetragon.FineGuidanceSensors_GetEventsServer) error
func (*Server) GetEventsListener ¶ added in v1.8.0
func (s *Server) GetEventsListener(request *tetragon.GetEventsRequest, server tetragon.FineGuidanceSensors_GetEventsServer, closer io.Closer) (ListenerFunc, error)
GetEventsListener builds the filter and aggregation setup for a GetEvents request, registers the event listener with the notifier and returns a run function that drives the event loop. Registering synchronously ensures that events delivered between the call to GetEventsListener and the start of the returned function are not lost. Separating setup from execution lets callers distinguish setup errors (bad filter config, invalid aggregation options) from runtime errors (send failures, context cancellation). Callers must invoke the returned ListenerFunc to drain events and clean up the listener.
func (*Server) GetHealth ¶
func (s *Server) GetHealth(_ context.Context, request *tetragon.GetHealthStatusRequest) (*tetragon.GetHealthStatusResponse, error)
func (*Server) GetInfo ¶ added in v1.7.0
func (s *Server) GetInfo(_ context.Context, _ *tetragon.GetInfoRequest) (*tetragon.GetInfoResponse, error)
func (*Server) GetVersion ¶
func (s *Server) GetVersion(_ context.Context, _ *tetragon.GetVersionRequest) (*tetragon.GetVersionResponse, error)
func (*Server) ListDomains ¶ added in v1.8.0
func (s *Server) ListDomains(ctx context.Context, _ *tetragon.ListDomainsRequest) (*tetragon.ListDomainsResponse, error)
func (*Server) ListSensors ¶
func (s *Server) ListSensors(_ context.Context, _ *tetragon.ListSensorsRequest) (*tetragon.ListSensorsResponse, error)
func (*Server) ListTracingPolicies ¶ added in v0.9.0
func (s *Server) ListTracingPolicies(ctx context.Context, req *tetragon.ListTracingPoliciesRequest) (*tetragon.ListTracingPoliciesResponse, error)
func (*Server) RemoveSensor ¶
func (s *Server) RemoveSensor(_ context.Context, req *tetragon.RemoveSensorRequest) (*tetragon.RemoveSensorResponse, error)
func (*Server) RuntimeHook ¶ added in v0.9.0
func (s *Server) RuntimeHook(ctx context.Context, req *tetragon.RuntimeHookRequest) (*tetragon.RuntimeHookResponse, error)
func (*Server) SetDebug ¶ added in v1.2.0
func (s *Server) SetDebug(_ context.Context, req *tetragon.SetDebugRequest) (*tetragon.SetDebugResponse, error)