gadgetservice

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger sends log messages through grpc

func (*Logger) GetLevel

func (l *Logger) GetLevel() logger.Level

func (*Logger) Log

func (l *Logger) Log(severity logger.Level, params ...any)

func (*Logger) Logf

func (l *Logger) Logf(severity logger.Level, format string, params ...any)

func (*Logger) SetLevel

func (l *Logger) SetLevel(level logger.Level)

type RunConfig added in v0.21.0

type RunConfig struct {
	// SocketType can be either unix or tcp
	SocketType string

	// SocketPath must be the path to a unix socket or ip:port, depending on
	// SocketType
	SocketPath string

	// If SocketGID != 0 and a unix socket is used, the ownership of that socket
	// will be changed to the given SocketGID
	SocketGID int
}

type Service

func NewService

func NewService(defaultLogger logger.Logger) *Service

func (*Service) Close

func (s *Service) Close()

func (*Service) CreateGadgetInstance added in v0.33.0

func (s *Service) CreateGadgetInstance(ctx context.Context, request *api.CreateGadgetInstanceRequest) (*api.CreateGadgetInstanceResponse, error)

func (*Service) GetGadgetInfo added in v0.22.0

func (*Service) GetGadgetInstance added in v0.33.0

func (s *Service) GetGadgetInstance(ctx context.Context, id *api.GadgetInstanceId) (*api.GadgetInstance, error)

func (*Service) GetInfo

func (s *Service) GetInfo(ctx context.Context, request *api.InfoRequest) (*api.InfoResponse, error)

func (*Service) GetOperatorMap added in v0.29.0

func (s *Service) GetOperatorMap() map[operators.DataOperator]*params.Params

func (*Service) ListGadgetInstances added in v0.33.0

func (s *Service) ListGadgetInstances(ctx context.Context, request *api.ListGadgetInstancesRequest) (*api.ListGadgetInstanceResponse, error)

func (*Service) RemoveGadgetInstance added in v0.33.0

func (s *Service) RemoveGadgetInstance(ctx context.Context, id *api.GadgetInstanceId) (*api.StatusResponse, error)

func (*Service) Run

func (s *Service) Run(runConfig RunConfig, serverOptions ...grpc.ServerOption) error

func (*Service) RunBuiltInGadget added in v0.28.0

func (s *Service) RunBuiltInGadget(runGadget api.BuiltInGadgetManager_RunBuiltInGadgetServer) error

func (*Service) RunGadget

func (s *Service) RunGadget(runGadget api.GadgetManager_RunGadgetServer) error

func (*Service) SetEventBufferLength added in v0.29.0

func (s *Service) SetEventBufferLength(val uint64)

func (*Service) SetInstanceManager added in v0.33.0

func (s *Service) SetInstanceManager(mgr *instancemanager.Manager)

func (*Service) SetStore added in v0.33.0

func (s *Service) SetStore(store store.Store)

Directories

Path Synopsis
Package apihelpers provides some helper functions for the API package; these were extracted into this package to avoid having additional dependencies on the API package itself
Package apihelpers provides some helper functions for the API package; these were extracted into this package to avoid having additional dependencies on the API package itself

Jump to

Keyboard shortcuts

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