server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 20 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 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) DeleteTracingPolicy added in v0.11.0

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

func (*FakeObserver) DisableSensor added in v0.9.0

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

func (*FakeObserver) DisableTracingPolicy added in v1.0.0

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

func (*FakeObserver) EnableSensor added in v0.9.0

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

func (*FakeObserver) EnableTracingPolicy added in v1.0.0

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

func (*FakeObserver) GetTreeProto added in v0.9.0

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

func (*FakeObserver) ListSensors added in v0.9.0

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

func (*FakeObserver) ListTracingPolicies added in v0.9.0

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

func (*FakeObserver) RemoveSensor added in v0.9.0

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

type Listener

type Listener interface {
	Notify(res *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 v0.11.0

func (*Server) DisableSensor

func (*Server) DisableTracingPolicy added in v1.0.0

func (*Server) EnableSensor

func (*Server) EnableTracingPolicy added in v1.0.0

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.9.0

func (*Server) NotifyListeners

func (s *Server) NotifyListeners(original interface{}, processed *tetragon.GetEventsResponse)

func (*Server) RemoveSensor

func (*Server) RuntimeHook added in v0.9.0

Jump to

Keyboard shortcuts

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