server

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitListenAddr added in v1.3.2

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

type FakeObserver struct{}

func (*FakeObserver) AddTracingPolicy

func (f *FakeObserver) AddTracingPolicy(ctx context.Context, tp tracingpolicy.TracingPolicy) error

func (*FakeObserver) DeleteTracingPolicy added in v1.3.2

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

func (*FakeObserver) DisableSensor

func (f *FakeObserver) DisableSensor(ctx context.Context, name string) error

func (*FakeObserver) DisableTracingPolicy added in v1.3.2

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

func (*FakeObserver) EnableSensor

func (f *FakeObserver) EnableSensor(ctx context.Context, name string) error

func (*FakeObserver) EnableTracingPolicy added in v1.3.2

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

func (*FakeObserver) GetTreeProto

func (f *FakeObserver) GetTreeProto(ctx context.Context, tname string) (*tetragon.StackTraceNode, error)

func (*FakeObserver) ListSensors

func (f *FakeObserver) ListSensors(ctx context.Context) (*[]sensors.SensorStatus, error)

func (*FakeObserver) ListTracingPolicies added in v0.8.20

func (f *FakeObserver) ListTracingPolicies(ctx context.Context) (*tetragon.ListTracingPoliciesResponse, error)

func (*FakeObserver) RemoveSensor

func (f *FakeObserver) RemoveSensor(ctx context.Context, sensorName string) error

type Listener

type Listener interface {
	Notify(res *tetragon.GetEventsResponse)
}

type Notifier added in v1.3.2

type Notifier interface {
	AddListener(listener Listener)
	RemoveListener(listener Listener)
	NotifyListener(original interface{}, processed *tetragon.GetEventsResponse)
}

type Server

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

func NewServer

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

func (*Server) DeleteTracingPolicy added in v1.3.2

func (*Server) DisableSensor

func (*Server) DisableTracingPolicy added in v1.3.2

func (*Server) EnableSensor

func (*Server) EnableTracingPolicy added in v1.3.2

func (*Server) GetDebug added in v1.3.2

func (*Server) GetEvents

func (*Server) GetEventsWG

func (s *Server) GetEventsWG(request *tetragon.GetEventsRequest, server tetragon.FineGuidanceSensors_GetEventsServer, closer io.Closer, readyWG *sync.WaitGroup) error

func (*Server) ListSensors

func (*Server) ListTracingPolicies added in v0.8.20

func (*Server) RemoveSensor

func (*Server) RuntimeHook added in v0.8.7

func (*Server) SetDebug added in v1.3.2

Jump to

Keyboard shortcuts

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