apipb

package
v0.0.0-...-bbc83da Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorKind_name = map[int32]string{
		0: "UNKNOWN",
		1: "BINARY_STRIPPED",
		2: "NO_AGENTS",
		3: "NO_PROCESSES",
		4: "PROCESS_MISSING",
		5: "ENVIRONMENT_MISSING",
	}
	ErrorKind_value = map[string]int32{
		"UNKNOWN":             0,
		"BINARY_STRIPPED":     1,
		"NO_AGENTS":           2,
		"NO_PROCESSES":        3,
		"PROCESS_MISSING":     4,
		"ENVIRONMENT_MISSING": 5,
	}
)

Enum value maps for ErrorKind.

View Source
var ApiService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.ApiService",
	HandlerType: (*ApiServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CaptureSnapshot",
			Handler:    _ApiService_CaptureSnapshot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

ApiService_ServiceDesc is the grpc.ServiceDesc for ApiService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterApiServiceServer

func RegisterApiServiceServer(s grpc.ServiceRegistrar, srv ApiServiceServer)

Types

type ApiServiceClient

type ApiServiceClient interface {
	// CaptureSnapshot captures a snapshot of the specified environment or the
	// specified process. If no snapshots are snapshotted successfully, it returns
	// an error containing SnapshotError as a detail. If at least one process
	// snapshot is successful, the RPC is successful.
	CaptureSnapshot(ctx context.Context, in *CaptureSnapshotRequest, opts ...grpc.CallOption) (*CaptureSnapshotResponse, error)
}

ApiServiceClient is the client API for ApiService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewApiServiceClient

func NewApiServiceClient(cc grpc.ClientConnInterface) ApiServiceClient

type ApiServiceServer

type ApiServiceServer interface {
	// CaptureSnapshot captures a snapshot of the specified environment or the
	// specified process. If no snapshots are snapshotted successfully, it returns
	// an error containing SnapshotError as a detail. If at least one process
	// snapshot is successful, the RPC is successful.
	CaptureSnapshot(context.Context, *CaptureSnapshotRequest) (*CaptureSnapshotResponse, error)
	// contains filtered or unexported methods
}

ApiServiceServer is the server API for ApiService service. All implementations must embed UnimplementedApiServiceServer for forward compatibility

type CaptureSnapshotRequest

type CaptureSnapshotRequest struct {

	// environment is the name of the environment to capture a snapshot of; the
	// snapshot will include all monitored processes reported by agents configured
	// with this environment. If empty, it refers to agents not configured with
	// any environment.
	Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	// If environment is not set, agent_fingerprint and process_fingerprint must
	// be set; they identify a single process to capture a snapshot by identifying
	// one particular agent and one process monitored by that agent. This is used
	// by the side-eye-go library to capture a snapshot of its own process.
	AgentFingerprint   string `protobuf:"bytes,2,opt,name=agent_fingerprint,json=agentFingerprint,proto3" json:"agent_fingerprint,omitempty"`
	ProcessFingerprint string `protobuf:"bytes,3,opt,name=process_fingerprint,json=processFingerprint,proto3" json:"process_fingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*CaptureSnapshotRequest) Descriptor deprecated

func (*CaptureSnapshotRequest) Descriptor() ([]byte, []int)

Deprecated: Use CaptureSnapshotRequest.ProtoReflect.Descriptor instead.

func (*CaptureSnapshotRequest) GetAgentFingerprint

func (x *CaptureSnapshotRequest) GetAgentFingerprint() string

func (*CaptureSnapshotRequest) GetEnvironment

func (x *CaptureSnapshotRequest) GetEnvironment() string

func (*CaptureSnapshotRequest) GetProcessFingerprint

func (x *CaptureSnapshotRequest) GetProcessFingerprint() string

func (*CaptureSnapshotRequest) ProtoMessage

func (*CaptureSnapshotRequest) ProtoMessage()

func (*CaptureSnapshotRequest) ProtoReflect

func (x *CaptureSnapshotRequest) ProtoReflect() protoreflect.Message

func (*CaptureSnapshotRequest) Reset

func (x *CaptureSnapshotRequest) Reset()

func (*CaptureSnapshotRequest) String

func (x *CaptureSnapshotRequest) String() string

type CaptureSnapshotResponse

type CaptureSnapshotResponse struct {
	SnapshotId  int64           `protobuf:"varint,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"`
	SnapshotUrl string          `protobuf:"bytes,2,opt,name=snapshot_url,json=snapshotUrl,proto3" json:"snapshot_url,omitempty"`
	Errors      []*ProcessError `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*CaptureSnapshotResponse) Descriptor deprecated

func (*CaptureSnapshotResponse) Descriptor() ([]byte, []int)

Deprecated: Use CaptureSnapshotResponse.ProtoReflect.Descriptor instead.

func (*CaptureSnapshotResponse) GetErrors

func (x *CaptureSnapshotResponse) GetErrors() []*ProcessError

func (*CaptureSnapshotResponse) GetSnapshotId

func (x *CaptureSnapshotResponse) GetSnapshotId() int64

func (*CaptureSnapshotResponse) GetSnapshotUrl

func (x *CaptureSnapshotResponse) GetSnapshotUrl() string

func (*CaptureSnapshotResponse) ProtoMessage

func (*CaptureSnapshotResponse) ProtoMessage()

func (*CaptureSnapshotResponse) ProtoReflect

func (x *CaptureSnapshotResponse) ProtoReflect() protoreflect.Message

func (*CaptureSnapshotResponse) Reset

func (x *CaptureSnapshotResponse) Reset()

func (*CaptureSnapshotResponse) String

func (x *CaptureSnapshotResponse) String() string

type ErrorKind

type ErrorKind int32
const (
	ErrorKind_UNKNOWN             ErrorKind = 0
	ErrorKind_BINARY_STRIPPED     ErrorKind = 1
	ErrorKind_NO_AGENTS           ErrorKind = 2
	ErrorKind_NO_PROCESSES        ErrorKind = 3
	ErrorKind_PROCESS_MISSING     ErrorKind = 4
	ErrorKind_ENVIRONMENT_MISSING ErrorKind = 5
)

func (ErrorKind) Descriptor

func (ErrorKind) Descriptor() protoreflect.EnumDescriptor

func (ErrorKind) Enum

func (x ErrorKind) Enum() *ErrorKind

func (ErrorKind) EnumDescriptor deprecated

func (ErrorKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorKind.Descriptor instead.

func (ErrorKind) Number

func (x ErrorKind) Number() protoreflect.EnumNumber

func (ErrorKind) String

func (x ErrorKind) String() string

func (ErrorKind) Type

type ProcessError

type ProcessError struct {
	Hostname  string    `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Program   string    `protobuf:"bytes,2,opt,name=program,proto3" json:"program,omitempty"`
	Pid       int64     `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
	Message   string    `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	ErrorKind ErrorKind `protobuf:"varint,5,opt,name=error_kind,json=errorKind,proto3,enum=api.ErrorKind" json:"error_kind,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessError) Descriptor deprecated

func (*ProcessError) Descriptor() ([]byte, []int)

Deprecated: Use ProcessError.ProtoReflect.Descriptor instead.

func (*ProcessError) GetErrorKind

func (x *ProcessError) GetErrorKind() ErrorKind

func (*ProcessError) GetHostname

func (x *ProcessError) GetHostname() string

func (*ProcessError) GetMessage

func (x *ProcessError) GetMessage() string

func (*ProcessError) GetPid

func (x *ProcessError) GetPid() int64

func (*ProcessError) GetProgram

func (x *ProcessError) GetProgram() string

func (*ProcessError) ProtoMessage

func (*ProcessError) ProtoMessage()

func (*ProcessError) ProtoReflect

func (x *ProcessError) ProtoReflect() protoreflect.Message

func (*ProcessError) Reset

func (x *ProcessError) Reset()

func (*ProcessError) String

func (x *ProcessError) String() string

type SnapshotError

type SnapshotError struct {

	// The error message as a human-readable string. This is the same as the
	// message of the outer gRPC error.
	Message   string    `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	ErrorKind ErrorKind `protobuf:"varint,2,opt,name=error_kind,json=errorKind,proto3,enum=api.ErrorKind" json:"error_kind,omitempty"`
	// contains filtered or unexported fields
}

SnapshotError is returned as an error detail by CaptureSnapshot when all the processes fail.

func (*SnapshotError) Descriptor deprecated

func (*SnapshotError) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotError.ProtoReflect.Descriptor instead.

func (*SnapshotError) GetErrorKind

func (x *SnapshotError) GetErrorKind() ErrorKind

func (*SnapshotError) GetMessage

func (x *SnapshotError) GetMessage() string

func (*SnapshotError) ProtoMessage

func (*SnapshotError) ProtoMessage()

func (*SnapshotError) ProtoReflect

func (x *SnapshotError) ProtoReflect() protoreflect.Message

func (*SnapshotError) Reset

func (x *SnapshotError) Reset()

func (*SnapshotError) String

func (x *SnapshotError) String() string

type UnimplementedApiServiceServer

type UnimplementedApiServiceServer struct {
}

UnimplementedApiServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedApiServiceServer) CaptureSnapshot

type UnsafeApiServiceServer

type UnsafeApiServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeApiServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApiServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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