server

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

nolint:revive // ignore unused parameter alerts, dummy methods

Index

Constants

View Source
const GrpcDomain = "grpc"

Variables

This section is empty.

Functions

func SplitListenAddr added in v0.10.0

func SplitListenAddr(arg string) (string, string, error)

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 (f *FakeObserver) DeleteTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error

func (*FakeObserver) DisableTracingPolicy added in v1.0.0

func (f *FakeObserver) DisableTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error

func (*FakeObserver) EnableTracingPolicy added in v1.0.0

func (f *FakeObserver) EnableTracingPolicy(ctx context.Context, sensorName string, sensorNamespace string, domain string) error

func (*FakeObserver) ListDomains added in v1.8.0

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 NewServer

func NewServer(ctx context.Context, cleanupWg *sync.WaitGroup, notifier Notifier, observer observer, hookRunner hookRunner, policyStore *policystore.Store) *Server

func (*Server) ConfigureTracingPolicy added in v1.4.0

func (*Server) DeleteTracingPolicy added in v0.11.0

func (*Server) DisableTracingPolicy added in v1.0.0

func (*Server) EnableTracingPolicy added in v1.0.0

func (*Server) GetDebug added in v1.2.0

func (*Server) GetEvents

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) GetInfo added in v1.7.0

func (*Server) ListDomains added in v1.8.0

func (*Server) ListTracingPolicies added in v0.9.0

func (*Server) RuntimeHook added in v0.9.0

func (*Server) SetDebug added in v1.2.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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