machinapb

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StandardLabels_name = map[int32]string{
		0: "executable_path",
		1: "executable_name",
		2: "command_line",
		3: "environment_variables",
		4: "hostname",
		5: "pid",
		6: "program",
		7: "environment",
	}
	StandardLabels_value = map[string]int32{
		"executable_path":       0,
		"executable_name":       1,
		"command_line":          2,
		"environment_variables": 3,
		"hostname":              4,
		"pid":                   5,
		"program":               6,
		"environment":           7,
	}
)

Enum value maps for StandardLabels.

View Source
var File_machina_proto protoreflect.FileDescriptor
View Source
var File_process_proto protoreflect.FileDescriptor
View Source
var Machina_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "machina.Machina",
	HandlerType: (*MachinaServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchProcesses",
			Handler:       _Machina_WatchProcesses_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetExecutable",
			Handler:       _Machina_GetExecutable_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Snapshot",
			Handler:       _Machina_Snapshot_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Events",
			Handler:       _Machina_Events_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "MachinaInfo",
			Handler:       _Machina_MachinaInfo_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "machina.proto",
}

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

Functions

func RegisterMachinaServer

func RegisterMachinaServer(s grpc.ServiceRegistrar, srv MachinaServer)

Types

type EventsRequest

type EventsRequest struct {

	// Types that are assignable to Request:
	//
	//	*EventsRequest_Setup_
	//	*EventsRequest_Stream_
	//	*EventsRequest_Finish_
	Request isEventsRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

func (*EventsRequest) Descriptor deprecated

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

Deprecated: Use EventsRequest.ProtoReflect.Descriptor instead.

func (*EventsRequest) GetFinish

func (x *EventsRequest) GetFinish() *EventsRequest_Finish

func (*EventsRequest) GetRequest

func (m *EventsRequest) GetRequest() isEventsRequest_Request

func (*EventsRequest) GetSetup

func (x *EventsRequest) GetSetup() *EventsRequest_Setup

func (*EventsRequest) GetStream

func (x *EventsRequest) GetStream() *EventsRequest_Stream

func (*EventsRequest) ProtoMessage

func (*EventsRequest) ProtoMessage()

func (*EventsRequest) ProtoReflect

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

func (*EventsRequest) Reset

func (x *EventsRequest) Reset()

func (*EventsRequest) String

func (x *EventsRequest) String() string

type EventsRequest_Finish

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

func (*EventsRequest_Finish) Descriptor deprecated

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

Deprecated: Use EventsRequest_Finish.ProtoReflect.Descriptor instead.

func (*EventsRequest_Finish) ProtoMessage

func (*EventsRequest_Finish) ProtoMessage()

func (*EventsRequest_Finish) ProtoReflect

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

func (*EventsRequest_Finish) Reset

func (x *EventsRequest_Finish) Reset()

func (*EventsRequest_Finish) String

func (x *EventsRequest_Finish) String() string

type EventsRequest_Finish_

type EventsRequest_Finish_ struct {
	Finish *EventsRequest_Finish `protobuf:"bytes,3,opt,name=finish,proto3,oneof"`
}

type EventsRequest_Setup

type EventsRequest_Setup struct {

	// The key associated with the artifacts needed for this snapshot.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The fingerprint of the process to snapshot.
	ProcessFingerprint string `protobuf:"bytes,2,opt,name=process_fingerprint,json=processFingerprint,proto3" json:"process_fingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsRequest_Setup) Descriptor deprecated

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

Deprecated: Use EventsRequest_Setup.ProtoReflect.Descriptor instead.

func (*EventsRequest_Setup) GetKey

func (x *EventsRequest_Setup) GetKey() string

func (*EventsRequest_Setup) GetProcessFingerprint

func (x *EventsRequest_Setup) GetProcessFingerprint() string

func (*EventsRequest_Setup) ProtoMessage

func (*EventsRequest_Setup) ProtoMessage()

func (*EventsRequest_Setup) ProtoReflect

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

func (*EventsRequest_Setup) Reset

func (x *EventsRequest_Setup) Reset()

func (*EventsRequest_Setup) String

func (x *EventsRequest_Setup) String() string

type EventsRequest_Setup_

type EventsRequest_Setup_ struct {
	Setup *EventsRequest_Setup `protobuf:"bytes,1,opt,name=setup,proto3,oneof"`
}

type EventsRequest_Stream

type EventsRequest_Stream struct {

	// The number of events to stream.
	MaxCount uint32 `protobuf:"varint,1,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// The duration to stream events for. This is used as an upper bound on the
	// duration to run the probe. In the common case, the client should send a
	// finish message to terminate the probe before this duration elapses. This
	// value is used to defend against unresponsive clients.
	DurationNs *uint64 `protobuf:"varint,2,opt,name=duration_ns,json=durationNs,proto3,oneof" json:"duration_ns,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsRequest_Stream) Descriptor deprecated

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

Deprecated: Use EventsRequest_Stream.ProtoReflect.Descriptor instead.

func (*EventsRequest_Stream) GetDurationNs

func (x *EventsRequest_Stream) GetDurationNs() uint64

func (*EventsRequest_Stream) GetMaxCount

func (x *EventsRequest_Stream) GetMaxCount() uint32

func (*EventsRequest_Stream) ProtoMessage

func (*EventsRequest_Stream) ProtoMessage()

func (*EventsRequest_Stream) ProtoReflect

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

func (*EventsRequest_Stream) Reset

func (x *EventsRequest_Stream) Reset()

func (*EventsRequest_Stream) String

func (x *EventsRequest_Stream) String() string

type EventsRequest_Stream_

type EventsRequest_Stream_ struct {
	Stream *EventsRequest_Stream `protobuf:"bytes,2,opt,name=stream,proto3,oneof"`
}

type EventsResponse

type EventsResponse struct {

	// Types that are assignable to Response:
	//
	//	*EventsResponse_Event_
	//	*EventsResponse_ApproximateBootTime_
	//	*EventsResponse_Attached_
	//	*EventsResponse_Detached_
	Response isEventsResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

func (*EventsResponse) Descriptor deprecated

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

Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead.

func (*EventsResponse) GetApproximateBootTime

func (x *EventsResponse) GetApproximateBootTime() *EventsResponse_ApproximateBootTime

func (*EventsResponse) GetAttached

func (x *EventsResponse) GetAttached() *EventsResponse_Attached

func (*EventsResponse) GetDetached

func (x *EventsResponse) GetDetached() *EventsResponse_Detached

func (*EventsResponse) GetEvent

func (x *EventsResponse) GetEvent() *EventsResponse_Event

func (*EventsResponse) GetResponse

func (m *EventsResponse) GetResponse() isEventsResponse_Response

func (*EventsResponse) ProtoMessage

func (*EventsResponse) ProtoMessage()

func (*EventsResponse) ProtoReflect

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

func (*EventsResponse) Reset

func (x *EventsResponse) Reset()

func (*EventsResponse) String

func (x *EventsResponse) String() string

type EventsResponse_ApproximateBootTime

type EventsResponse_ApproximateBootTime struct {
	ApproximateBootTimeNs uint64 `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

ApproximateBootTime is sent after the probes have been loaded. It is needed because bpf only has access to CLOCK_MONOTONIC time (at least until version 6.1 when bpf_ktime_get_tai_ns was introduced). This value is used to adjust the timestamp in the event to a wall clock timestamp. It will be approximate, but should be close enough.

func (*EventsResponse_ApproximateBootTime) Descriptor deprecated

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

Deprecated: Use EventsResponse_ApproximateBootTime.ProtoReflect.Descriptor instead.

func (*EventsResponse_ApproximateBootTime) GetApproximateBootTimeNs

func (x *EventsResponse_ApproximateBootTime) GetApproximateBootTimeNs() uint64

func (*EventsResponse_ApproximateBootTime) ProtoMessage

func (*EventsResponse_ApproximateBootTime) ProtoMessage()

func (*EventsResponse_ApproximateBootTime) ProtoReflect

func (*EventsResponse_ApproximateBootTime) Reset

func (*EventsResponse_ApproximateBootTime) String

type EventsResponse_ApproximateBootTime_

type EventsResponse_ApproximateBootTime_ struct {
	ApproximateBootTime *EventsResponse_ApproximateBootTime `protobuf:"bytes,2,opt,name=approximate_boot_time,json=approximateBootTime,proto3,oneof"`
}

type EventsResponse_Attached

type EventsResponse_Attached struct {

	// A timestamp that precedes the first event.
	AttachedTimestampMonotonicNs uint64 `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EventsResponse_Attached) Descriptor deprecated

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

Deprecated: Use EventsResponse_Attached.ProtoReflect.Descriptor instead.

func (*EventsResponse_Attached) GetAttachedTimestampMonotonicNs

func (x *EventsResponse_Attached) GetAttachedTimestampMonotonicNs() uint64

func (*EventsResponse_Attached) ProtoMessage

func (*EventsResponse_Attached) ProtoMessage()

func (*EventsResponse_Attached) ProtoReflect

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

func (*EventsResponse_Attached) Reset

func (x *EventsResponse_Attached) Reset()

func (*EventsResponse_Attached) String

func (x *EventsResponse_Attached) String() string

type EventsResponse_Attached_

type EventsResponse_Attached_ struct {
	Attached *EventsResponse_Attached `protobuf:"bytes,3,opt,name=attached,proto3,oneof"`
}

type EventsResponse_Detached

type EventsResponse_Detached struct {
	SummaryStatistics *EventsResponse_SummaryStatistics `protobuf:"bytes,1,opt,name=summary_statistics,json=summaryStatistics,proto3" json:"summary_statistics,omitempty"`
	// The timestamp of the detached event.
	DetachedTimestampMonotonicNs uint64 `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EventsResponse_Detached) Descriptor deprecated

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

Deprecated: Use EventsResponse_Detached.ProtoReflect.Descriptor instead.

func (*EventsResponse_Detached) GetDetachedTimestampMonotonicNs

func (x *EventsResponse_Detached) GetDetachedTimestampMonotonicNs() uint64

func (*EventsResponse_Detached) GetSummaryStatistics

func (x *EventsResponse_Detached) GetSummaryStatistics() *EventsResponse_SummaryStatistics

func (*EventsResponse_Detached) ProtoMessage

func (*EventsResponse_Detached) ProtoMessage()

func (*EventsResponse_Detached) ProtoReflect

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

func (*EventsResponse_Detached) Reset

func (x *EventsResponse_Detached) Reset()

func (*EventsResponse_Detached) String

func (x *EventsResponse_Detached) String() string

type EventsResponse_Detached_

type EventsResponse_Detached_ struct {
	Detached *EventsResponse_Detached `protobuf:"bytes,4,opt,name=detached,proto3,oneof"`
}

type EventsResponse_Event

type EventsResponse_Event struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsResponse_Event) Descriptor deprecated

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

Deprecated: Use EventsResponse_Event.ProtoReflect.Descriptor instead.

func (*EventsResponse_Event) GetData

func (x *EventsResponse_Event) GetData() []byte

func (*EventsResponse_Event) ProtoMessage

func (*EventsResponse_Event) ProtoMessage()

func (*EventsResponse_Event) ProtoReflect

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

func (*EventsResponse_Event) Reset

func (x *EventsResponse_Event) Reset()

func (*EventsResponse_Event) String

func (x *EventsResponse_Event) String() string

type EventsResponse_Event_

type EventsResponse_Event_ struct {
	Event *EventsResponse_Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"`
}

type EventsResponse_SummaryStatistics

type EventsResponse_SummaryStatistics struct {
	EventsDroppedInEbpf  uint32 `protobuf:"varint,2,opt,name=events_dropped_in_ebpf,json=eventsDroppedInEbpf,proto3" json:"events_dropped_in_ebpf,omitempty"`
	EventsRejectedInEbpf uint32 `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EventsResponse_SummaryStatistics) Descriptor deprecated

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

Deprecated: Use EventsResponse_SummaryStatistics.ProtoReflect.Descriptor instead.

func (*EventsResponse_SummaryStatistics) GetEventsDroppedInEbpf

func (x *EventsResponse_SummaryStatistics) GetEventsDroppedInEbpf() uint32

func (*EventsResponse_SummaryStatistics) GetEventsRejectedInEbpf

func (x *EventsResponse_SummaryStatistics) GetEventsRejectedInEbpf() uint32

func (*EventsResponse_SummaryStatistics) ProtoMessage

func (*EventsResponse_SummaryStatistics) ProtoMessage()

func (*EventsResponse_SummaryStatistics) ProtoReflect

func (*EventsResponse_SummaryStatistics) Reset

func (*EventsResponse_SummaryStatistics) String

type GetExecutableRequest

type GetExecutableRequest struct {

	// The path to the executable.
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*GetExecutableRequest) Descriptor deprecated

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

Deprecated: Use GetExecutableRequest.ProtoReflect.Descriptor instead.

func (*GetExecutableRequest) GetHash

func (x *GetExecutableRequest) GetHash() string

func (*GetExecutableRequest) ProtoMessage

func (*GetExecutableRequest) ProtoMessage()

func (*GetExecutableRequest) ProtoReflect

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

func (*GetExecutableRequest) Reset

func (x *GetExecutableRequest) Reset()

func (*GetExecutableRequest) String

func (x *GetExecutableRequest) String() string

type LabelRule

type LabelRule struct {
	Label                 string       `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	Value                 string       `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	PredicatesConjunction []*Predicate `protobuf:"bytes,3,rep,name=predicates_conjunction,json=predicatesConjunction,proto3" json:"predicates_conjunction,omitempty"`
	// contains filtered or unexported fields
}

A LabelRule asks the agent to apply a given label=value pair to the processes that match all the predicates in a list.

func (*LabelRule) Descriptor deprecated

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

Deprecated: Use LabelRule.ProtoReflect.Descriptor instead.

func (*LabelRule) GetLabel

func (x *LabelRule) GetLabel() string

func (*LabelRule) GetPredicatesConjunction

func (x *LabelRule) GetPredicatesConjunction() []*Predicate

func (*LabelRule) GetValue

func (x *LabelRule) GetValue() string

func (*LabelRule) ProtoMessage

func (*LabelRule) ProtoMessage()

func (*LabelRule) ProtoReflect

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

func (*LabelRule) Reset

func (x *LabelRule) Reset()

func (*LabelRule) String

func (x *LabelRule) String() string

type LabelValue

type LabelValue struct {
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelValue) Descriptor deprecated

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

Deprecated: Use LabelValue.ProtoReflect.Descriptor instead.

func (*LabelValue) GetLabel

func (x *LabelValue) GetLabel() string

func (*LabelValue) GetValue

func (x *LabelValue) GetValue() string

func (*LabelValue) ProtoMessage

func (*LabelValue) ProtoMessage()

func (*LabelValue) ProtoReflect

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

func (*LabelValue) Reset

func (x *LabelValue) Reset()

func (*LabelValue) String

func (x *LabelValue) String() string

type MachinaClient

type MachinaClient interface {
	// WatchProcesses returns a stream of processes which match the given
	// predicates.
	WatchProcesses(ctx context.Context, in *WatchProcessesRequest, opts ...grpc.CallOption) (Machina_WatchProcessesClient, error)
	// GetExecutable returns a stream of chunks which make up the executable.
	GetExecutable(ctx context.Context, in *GetExecutableRequest, opts ...grpc.CallOption) (Machina_GetExecutableClient, error)
	// Snapshot sets up and performs a snapshot of the given process.
	// The protocol is designed to allow for many snapshots to be taken close in
	// time across many processes and machinas. In order to make this possible,
	// the protocol has two phases of execution: Setup and Snapshot.
	//
	// Setup: The client sends a Setup message to the server. The server does not
	// respond with headers until it has finished setting up the snapshot. Any
	// additional messages sent by the client at this point may result in an error
	// until the headers have been received by the client. At this point, the
	// server may download the needed snapshot artifacts if it does not already
	// have them using the key in the setup request.
	//
	// Snapshot: Once the headers have been received by the client, the client may
	// send a Snapshot message to the server. The server will respond with a
	// stream that has a single SnapshotResponse message.
	//
	// The protocol may be extended in the future to allow for multiple snapshots.
	Snapshot(ctx context.Context, opts ...grpc.CallOption) (Machina_SnapshotClient, error)
	// Events sets up and performs a streaming events probe.
	// The protocol is designed to allow for many events streams to commence
	// around the same time across many processes and machinas. In order to make
	// this possible, the protocol has three phases of execution: Setup, Stream,
	// and Finish.
	//
	// Setup: The client sends a Setup message to the server. The server does not
	// respond with headers until it has finished setting up the events stream.
	// Any additional messages sent by the client at this point may result in an
	// error until the headers have been received by the client. At this point,
	// the server may download the needed events artifacts if it does not already
	// have them using the key in the setup request.
	//
	// Stream: Once the headers have been received by the client, the client shall
	// attach the probes and begin streaming events, up to the max_count specified
	// in the Stream message. The server will respond with a Finish message when
	// the client should stop streaming events.
	//
	// Finish: The client should stop streaming events and send a summary of the
	// events that were streamed.
	Events(ctx context.Context, opts ...grpc.CallOption) (Machina_EventsClient, error)
	// GetMetadata returns metadata about the machina.
	//
	// The response is streaming so that ex can detect disconnections from
	// the machina.
	MachinaInfo(ctx context.Context, in *MachinaInfoRequest, opts ...grpc.CallOption) (Machina_MachinaInfoClient, error)
}

MachinaClient is the client API for Machina 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 NewMachinaClient

func NewMachinaClient(cc grpc.ClientConnInterface) MachinaClient

type MachinaInfoRequest

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

func (*MachinaInfoRequest) Descriptor deprecated

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

Deprecated: Use MachinaInfoRequest.ProtoReflect.Descriptor instead.

func (*MachinaInfoRequest) ProtoMessage

func (*MachinaInfoRequest) ProtoMessage()

func (*MachinaInfoRequest) ProtoReflect

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

func (*MachinaInfoRequest) Reset

func (x *MachinaInfoRequest) Reset()

func (*MachinaInfoRequest) String

func (x *MachinaInfoRequest) String() string

type MachinaInfoResponse

type MachinaInfoResponse struct {

	// A unique identifier for this machina.
	Fingerprint string `protobuf:"bytes,1,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// The hostname of the machina.
	Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// The version of the machina.
	Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// The token of the tenant to which this machina belongs.
	//
	// TODO: Define any structure for this token. For now it's opaque and will
	// correspond to the token used to scope requests to a tenant.
	TenantToken string `protobuf:"bytes,5,opt,name=tenant_token,json=tenantToken,proto3" json:"tenant_token,omitempty"`
	// The environment flag passed to the machina.
	Environment string `protobuf:"bytes,6,opt,name=environment,proto3" json:"environment,omitempty"`
	// The IP addresses of the machina.
	IpAddresses []string `protobuf:"bytes,7,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"`
	// contains filtered or unexported fields
}

func (*MachinaInfoResponse) Descriptor deprecated

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

Deprecated: Use MachinaInfoResponse.ProtoReflect.Descriptor instead.

func (*MachinaInfoResponse) GetEnvironment

func (x *MachinaInfoResponse) GetEnvironment() string

func (*MachinaInfoResponse) GetFingerprint

func (x *MachinaInfoResponse) GetFingerprint() string

func (*MachinaInfoResponse) GetHostname

func (x *MachinaInfoResponse) GetHostname() string

func (*MachinaInfoResponse) GetIpAddresses

func (x *MachinaInfoResponse) GetIpAddresses() []string

func (*MachinaInfoResponse) GetTenantToken

func (x *MachinaInfoResponse) GetTenantToken() string

func (*MachinaInfoResponse) GetVersion

func (x *MachinaInfoResponse) GetVersion() string

func (*MachinaInfoResponse) ProtoMessage

func (*MachinaInfoResponse) ProtoMessage()

func (*MachinaInfoResponse) ProtoReflect

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

func (*MachinaInfoResponse) Reset

func (x *MachinaInfoResponse) Reset()

func (*MachinaInfoResponse) String

func (x *MachinaInfoResponse) String() string

type MachinaServer

type MachinaServer interface {
	// WatchProcesses returns a stream of processes which match the given
	// predicates.
	WatchProcesses(*WatchProcessesRequest, Machina_WatchProcessesServer) error
	// GetExecutable returns a stream of chunks which make up the executable.
	GetExecutable(*GetExecutableRequest, Machina_GetExecutableServer) error
	// Snapshot sets up and performs a snapshot of the given process.
	// The protocol is designed to allow for many snapshots to be taken close in
	// time across many processes and machinas. In order to make this possible,
	// the protocol has two phases of execution: Setup and Snapshot.
	//
	// Setup: The client sends a Setup message to the server. The server does not
	// respond with headers until it has finished setting up the snapshot. Any
	// additional messages sent by the client at this point may result in an error
	// until the headers have been received by the client. At this point, the
	// server may download the needed snapshot artifacts if it does not already
	// have them using the key in the setup request.
	//
	// Snapshot: Once the headers have been received by the client, the client may
	// send a Snapshot message to the server. The server will respond with a
	// stream that has a single SnapshotResponse message.
	//
	// The protocol may be extended in the future to allow for multiple snapshots.
	Snapshot(Machina_SnapshotServer) error
	// Events sets up and performs a streaming events probe.
	// The protocol is designed to allow for many events streams to commence
	// around the same time across many processes and machinas. In order to make
	// this possible, the protocol has three phases of execution: Setup, Stream,
	// and Finish.
	//
	// Setup: The client sends a Setup message to the server. The server does not
	// respond with headers until it has finished setting up the events stream.
	// Any additional messages sent by the client at this point may result in an
	// error until the headers have been received by the client. At this point,
	// the server may download the needed events artifacts if it does not already
	// have them using the key in the setup request.
	//
	// Stream: Once the headers have been received by the client, the client shall
	// attach the probes and begin streaming events, up to the max_count specified
	// in the Stream message. The server will respond with a Finish message when
	// the client should stop streaming events.
	//
	// Finish: The client should stop streaming events and send a summary of the
	// events that were streamed.
	Events(Machina_EventsServer) error
	// GetMetadata returns metadata about the machina.
	//
	// The response is streaming so that ex can detect disconnections from
	// the machina.
	MachinaInfo(*MachinaInfoRequest, Machina_MachinaInfoServer) error
	// contains filtered or unexported methods
}

MachinaServer is the server API for Machina service. All implementations must embed UnimplementedMachinaServer for forward compatibility

type Machina_EventsClient

type Machina_EventsClient interface {
	Send(*EventsRequest) error
	Recv() (*EventsResponse, error)
	grpc.ClientStream
}

type Machina_EventsServer

type Machina_EventsServer interface {
	Send(*EventsResponse) error
	Recv() (*EventsRequest, error)
	grpc.ServerStream
}

type Machina_GetExecutableClient

type Machina_GetExecutableClient interface {
	Recv() (*chunkpb.Chunk, error)
	grpc.ClientStream
}

type Machina_GetExecutableServer

type Machina_GetExecutableServer interface {
	Send(*chunkpb.Chunk) error
	grpc.ServerStream
}

type Machina_MachinaInfoClient

type Machina_MachinaInfoClient interface {
	Recv() (*MachinaInfoResponse, error)
	grpc.ClientStream
}

type Machina_MachinaInfoServer

type Machina_MachinaInfoServer interface {
	Send(*MachinaInfoResponse) error
	grpc.ServerStream
}

type Machina_SnapshotClient

type Machina_SnapshotClient interface {
	Send(*SnapshotRequest) error
	Recv() (*SnapshotResponse, error)
	grpc.ClientStream
}

type Machina_SnapshotServer

type Machina_SnapshotServer interface {
	Send(*SnapshotResponse) error
	Recv() (*SnapshotRequest, error)
	grpc.ServerStream
}

type Machina_WatchProcessesClient

type Machina_WatchProcessesClient interface {
	Recv() (*Update, error)
	grpc.ClientStream
}

type Machina_WatchProcessesServer

type Machina_WatchProcessesServer interface {
	Send(*Update) error
	grpc.ServerStream
}

type Predicate

type Predicate struct {
	Label      string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	ValueRegex string `protobuf:"bytes,2,opt,name=value_regex,json=valueRegex,proto3" json:"value_regex,omitempty"`
	// contains filtered or unexported fields
}

Predicates are part of labeling rules.

func (*Predicate) Descriptor deprecated

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

Deprecated: Use Predicate.ProtoReflect.Descriptor instead.

func (*Predicate) GetLabel

func (x *Predicate) GetLabel() string

func (*Predicate) GetValueRegex

func (x *Predicate) GetValueRegex() string

func (*Predicate) ProtoMessage

func (*Predicate) ProtoMessage()

func (*Predicate) ProtoReflect

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

func (*Predicate) Reset

func (x *Predicate) Reset()

func (*Predicate) String

func (x *Predicate) String() string

type Process

type Process struct {

	// Process ID.
	Pid uint64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
	// Command line arguments.
	Cmd []string `protobuf:"bytes,2,rep,name=cmd,proto3" json:"cmd,omitempty"`
	// Path pointed to by /proc/<pid>/exe. This is the path to the binary, which
	// is also present as the first component of `cmd`, except exe_path has all
	// symlinks resolved (if any).
	ExePath string `protobuf:"bytes,3,opt,name=exe_path,json=exePath,proto3" json:"exe_path,omitempty"`
	// Environment variables.
	Env []string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty"`
	// Time when the process was started.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The binary hash of the process, if we have computed it, encoded as hex.
	//
	// It will not be computed for all processes, only those that are matched to a
	// program (see the `program` field).
	BinaryHash string `protobuf:"bytes,6,opt,name=binary_hash,json=binaryHash,proto3" json:"binary_hash,omitempty"`
	// Unique fingerprint of the process.
	Fingerprint string `protobuf:"bytes,7,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// The program that this process corresponds to, as assigned by a labeling
	// rule. An empty value means that the process was not matched to a program.
	Program string `protobuf:"bytes,8,opt,name=program,proto3" json:"program,omitempty"`
	// The environment that (the agent corresponding to) this process is running
	// in, as configured through an agent flag.
	Environment string `protobuf:"bytes,9,opt,name=environment,proto3" json:"environment,omitempty"`
	// The labels, as assigned by the labeling rules applied by the agent.
	Labels []*LabelValue `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"`
	// The ephemeral flag indicates that the process is not expected to be long
	// lived. Data is supposed to filter out these processes from showing up in
	// the UI.
	Ephemeral bool `protobuf:"varint,11,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"`
	// contains filtered or unexported fields
}

func (*Process) Descriptor deprecated

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

Deprecated: Use Process.ProtoReflect.Descriptor instead.

func (*Process) GetBinaryHash

func (x *Process) GetBinaryHash() string

func (*Process) GetCmd

func (x *Process) GetCmd() []string

func (*Process) GetEnv

func (x *Process) GetEnv() []string

func (*Process) GetEnvironment

func (x *Process) GetEnvironment() string

func (*Process) GetEphemeral

func (x *Process) GetEphemeral() bool

func (*Process) GetExePath

func (x *Process) GetExePath() string

func (*Process) GetFingerprint

func (x *Process) GetFingerprint() string

func (*Process) GetLabels

func (x *Process) GetLabels() []*LabelValue

func (*Process) GetPid

func (x *Process) GetPid() uint64

func (*Process) GetProgram

func (x *Process) GetProgram() string

func (*Process) GetStartTime

func (x *Process) GetStartTime() *timestamppb.Timestamp

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) ProtoReflect

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

func (*Process) Reset

func (x *Process) Reset()

func (*Process) String

func (x *Process) String() string

type SnapshotRequest

type SnapshotRequest struct {

	// Types that are assignable to Request:
	//
	//	*SnapshotRequest_Setup_
	//	*SnapshotRequest_Snapshot_
	Request isSnapshotRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

The SnapshotRequest drives the snapshot process.

func (*SnapshotRequest) Descriptor deprecated

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

Deprecated: Use SnapshotRequest.ProtoReflect.Descriptor instead.

func (*SnapshotRequest) GetRequest

func (m *SnapshotRequest) GetRequest() isSnapshotRequest_Request

func (*SnapshotRequest) GetSetup

func (x *SnapshotRequest) GetSetup() *SnapshotRequest_Setup

func (*SnapshotRequest) GetSnapshot

func (x *SnapshotRequest) GetSnapshot() *SnapshotRequest_Snapshot

func (*SnapshotRequest) ProtoMessage

func (*SnapshotRequest) ProtoMessage()

func (*SnapshotRequest) ProtoReflect

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

func (*SnapshotRequest) Reset

func (x *SnapshotRequest) Reset()

func (*SnapshotRequest) String

func (x *SnapshotRequest) String() string

type SnapshotRequest_Setup

type SnapshotRequest_Setup struct {

	// The key associated with the artifacts needed for this snapshot.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The fingerprint of the process to snapshot.
	ProcessFingerprint string `protobuf:"bytes,2,opt,name=process_fingerprint,json=processFingerprint,proto3" json:"process_fingerprint,omitempty"`
	// contains filtered or unexported fields
}

Setup is the first message from the client in the Snapshot protocol.

func (*SnapshotRequest_Setup) Descriptor deprecated

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

Deprecated: Use SnapshotRequest_Setup.ProtoReflect.Descriptor instead.

func (*SnapshotRequest_Setup) GetKey

func (x *SnapshotRequest_Setup) GetKey() string

func (*SnapshotRequest_Setup) GetProcessFingerprint

func (x *SnapshotRequest_Setup) GetProcessFingerprint() string

func (*SnapshotRequest_Setup) ProtoMessage

func (*SnapshotRequest_Setup) ProtoMessage()

func (*SnapshotRequest_Setup) ProtoReflect

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

func (*SnapshotRequest_Setup) Reset

func (x *SnapshotRequest_Setup) Reset()

func (*SnapshotRequest_Setup) String

func (x *SnapshotRequest_Setup) String() string

type SnapshotRequest_Setup_

type SnapshotRequest_Setup_ struct {
	Setup *SnapshotRequest_Setup `protobuf:"bytes,1,opt,name=setup,proto3,oneof"`
}

type SnapshotRequest_Snapshot

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

Snapshot is the second message from the client in the Snapshot protocol. It trggers the snapshot process.

func (*SnapshotRequest_Snapshot) Descriptor deprecated

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

Deprecated: Use SnapshotRequest_Snapshot.ProtoReflect.Descriptor instead.

func (*SnapshotRequest_Snapshot) ProtoMessage

func (*SnapshotRequest_Snapshot) ProtoMessage()

func (*SnapshotRequest_Snapshot) ProtoReflect

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

func (*SnapshotRequest_Snapshot) Reset

func (x *SnapshotRequest_Snapshot) Reset()

func (*SnapshotRequest_Snapshot) String

func (x *SnapshotRequest_Snapshot) String() string

type SnapshotRequest_Snapshot_

type SnapshotRequest_Snapshot_ struct {
	Snapshot *SnapshotRequest_Snapshot `protobuf:"bytes,2,opt,name=snapshot,proto3,oneof"`
}

type SnapshotResponse

type SnapshotResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// The timestamp of the snapshot. This is a best-effort timestamp that
	// should closely match the time at which the snapshot was taken.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The duration of the pause for the snapshot as observed by the agent.
	PauseDurationNs uint64 `protobuf:"varint,3,opt,name=pause_duration_ns,json=pauseDurationNs,proto3" json:"pause_duration_ns,omitempty"`
	// contains filtered or unexported fields
}

func (*SnapshotResponse) Descriptor deprecated

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

Deprecated: Use SnapshotResponse.ProtoReflect.Descriptor instead.

func (*SnapshotResponse) GetData

func (x *SnapshotResponse) GetData() []byte

func (*SnapshotResponse) GetPauseDurationNs

func (x *SnapshotResponse) GetPauseDurationNs() uint64

func (*SnapshotResponse) GetTimestamp

func (x *SnapshotResponse) GetTimestamp() *timestamppb.Timestamp

func (*SnapshotResponse) ProtoMessage

func (*SnapshotResponse) ProtoMessage()

func (*SnapshotResponse) ProtoReflect

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

func (*SnapshotResponse) Reset

func (x *SnapshotResponse) Reset()

func (*SnapshotResponse) String

func (x *SnapshotResponse) String() string

type StandardLabels

type StandardLabels int32
const (
	StandardLabels_executable_path StandardLabels = 0
	// The last element of executable_path.
	StandardLabels_executable_name StandardLabels = 1
	// A filter on the command line passes if any of the individual arguments
	// match the regex.
	StandardLabels_command_line StandardLabels = 2
	// A filter on the environment passes if any of the environment variable
	// key-values match the regex.
	StandardLabels_environment_variables StandardLabels = 3
	StandardLabels_hostname              StandardLabels = 4
	StandardLabels_pid                   StandardLabels = 5
	StandardLabels_program               StandardLabels = 6
	// environment is a label that an agent can be configured to apply to the
	// processes it discovers.
	StandardLabels_environment StandardLabels = 7
)

func (StandardLabels) Descriptor

func (StandardLabels) Enum

func (x StandardLabels) Enum() *StandardLabels

func (StandardLabels) EnumDescriptor deprecated

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

Deprecated: Use StandardLabels.Descriptor instead.

func (StandardLabels) Number

func (StandardLabels) String

func (x StandardLabels) String() string

func (StandardLabels) Type

type UnimplementedMachinaServer

type UnimplementedMachinaServer struct {
}

UnimplementedMachinaServer must be embedded to have forward compatible implementations.

func (UnimplementedMachinaServer) Events

func (UnimplementedMachinaServer) GetExecutable

func (UnimplementedMachinaServer) MachinaInfo

func (UnimplementedMachinaServer) Snapshot

func (UnimplementedMachinaServer) WatchProcesses

type UnsafeMachinaServer

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

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

type Update

type Update struct {

	// The process which was updated.
	Added   []*Process `protobuf:"bytes,1,rep,name=added,proto3" json:"added,omitempty"`
	Removed []string   `protobuf:"bytes,2,rep,name=removed,proto3" json:"removed,omitempty"`
	// contains filtered or unexported fields
}

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) GetAdded

func (x *Update) GetAdded() []*Process

func (*Update) GetRemoved

func (x *Update) GetRemoved() []string

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect

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

func (*Update) Reset

func (x *Update) Reset()

func (*Update) String

func (x *Update) String() string

type WatchProcessesRequest

type WatchProcessesRequest struct {

	// Predicates which are used to filter the processes. The resulting set will
	// be the disjunction of the predicates (OR).
	LabelRules []*LabelRule `protobuf:"bytes,2,rep,name=label_rules,json=labelRules,proto3" json:"label_rules,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchProcessesRequest) Descriptor deprecated

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

Deprecated: Use WatchProcessesRequest.ProtoReflect.Descriptor instead.

func (*WatchProcessesRequest) GetLabelRules

func (x *WatchProcessesRequest) GetLabelRules() []*LabelRule

func (*WatchProcessesRequest) ProtoMessage

func (*WatchProcessesRequest) ProtoMessage()

func (*WatchProcessesRequest) ProtoReflect

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

func (*WatchProcessesRequest) Reset

func (x *WatchProcessesRequest) Reset()

func (*WatchProcessesRequest) String

func (x *WatchProcessesRequest) String() string

Jump to

Keyboard shortcuts

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