server

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 19 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) DelTracingPolicy added in v0.9.0

func (f *FakeObserver) DelTracingPolicy(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) EnableSensor added in v0.9.0

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

func (*FakeObserver) GetSensorConfig added in v0.9.0

func (f *FakeObserver) GetSensorConfig(ctx context.Context, k string, v string) (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

func (*FakeObserver) SetSensorConfig added in v0.9.0

func (f *FakeObserver) SetSensorConfig(ctx context.Context, name string, cfgkey string, cfgval 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) DisableSensor

func (*Server) EnableSensor

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