server

package
v0.0.0-...-f652df5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loggers

type Loggers struct {
	ErrorLogger func(err error)
	InfoLogger  func(format string, args ...any)
}

type Server

type Server struct {
	machinapb.UnimplementedMachinaServer
	machinapb.UnimplementedGoPprofServer
	// contains filtered or unexported fields
}

Server implements the machinapb.MachinaServer interface.

func NewServer

func NewServer(
	agentFingerprint uuid.UUID,
	processFingerprint string,
	tenantToken string,
	environment string,
	programName string,
	fetcher SnapshotFetcher,
	ephemeralProcess bool,
	loggers Loggers,
) *Server

NewServer constructs a new Server object.

func (*Server) Capture

func (s *Server) Capture(request *machinapb.CaptureRequest, server machinapb.GoPprof_CaptureServer) error

Capture implements machinapb.GoPprofServer interface.

func (*Server) Events

func (s *Server) Events(stream machinapb.Machina_EventsServer) error

func (*Server) GetExecutable

GetExecutable implements machinapb.MachinaServer.

func (*Server) MachinaInfo

MachinaInfo implements machinapb.MachinaServer.

func (*Server) Snapshot

func (s *Server) Snapshot(stream machinapb.Machina_SnapshotServer) (err error)

Snapshot implements machinapb.MachinaServer.

func (*Server) WatchProcesses

WatchProcesses implements machinapb.MachinaServer.

The request proto is ignored. The current process is reported unconditionally, with the configured program name. Other processes are not reported.

type SnapshotFetcher

type SnapshotFetcher interface {
	FetchSnapshotProgram(ctx context.Context, key string) (*snapshotpb.SnapshotProgram, error)
}

func NewSnapshotFetcher

func NewSnapshotFetcher(
	artifacts artifactspb.ArtifactStoreClient,
) SnapshotFetcher

Jump to

Keyboard shortcuts

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