agentv1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BundleService_Watch_FullMethodName = "/inkwall.agent.v1.BundleService/Watch"
)

Variables

View Source
var BundleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "inkwall.agent.v1.BundleService",
	HandlerType: (*BundleServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _BundleService_Watch_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "agent/v1/agent.proto",
}

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

View Source
var File_agent_v1_agent_proto protoreflect.FileDescriptor

Functions

func RegisterBundleServiceServer

func RegisterBundleServiceServer(s grpc.ServiceRegistrar, srv BundleServiceServer)

Types

type Ack

type Ack struct {
	BundleVersion uint64 `protobuf:"varint,1,opt,name=bundle_version,json=bundleVersion,proto3" json:"bundle_version,omitempty"`
	// contains filtered or unexported fields
}

Ack reports a bundle the engine applied.

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetBundleVersion

func (x *Ack) GetBundleVersion() uint64

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type BundleServiceClient

type BundleServiceClient interface {
	// Watch is the engine's stream. The engine sends Hello first; the operator
	// answers with the current bundle, then with every new one. The engine
	// answers each bundle with Ack or Nack and sends heartbeats, its
	// security events and its request counts.
	Watch(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WatchRequest, WatchResponse], error)
}

BundleServiceClient is the client API for BundleService 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.

BundleService is served by every operator replica.

type BundleServiceServer

type BundleServiceServer interface {
	// Watch is the engine's stream. The engine sends Hello first; the operator
	// answers with the current bundle, then with every new one. The engine
	// answers each bundle with Ack or Nack and sends heartbeats, its
	// security events and its request counts.
	Watch(grpc.BidiStreamingServer[WatchRequest, WatchResponse]) error
	// contains filtered or unexported methods
}

BundleServiceServer is the server API for BundleService service. All implementations must embed UnimplementedBundleServiceServer for forward compatibility.

BundleService is served by every operator replica.

type BundleService_WatchClient

type BundleService_WatchClient = grpc.BidiStreamingClient[WatchRequest, WatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type BundleService_WatchServer

type BundleService_WatchServer = grpc.BidiStreamingServer[WatchRequest, WatchResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Heartbeat

type Heartbeat struct {

	// The bundle the engine runs.
	BundleVersion uint64 `protobuf:"varint,1,opt,name=bundle_version,json=bundleVersion,proto3" json:"bundle_version,omitempty"`
	// Requests being inspected, and the most that can be.
	InFlight uint32 `protobuf:"varint,2,opt,name=in_flight,json=inFlight,proto3" json:"in_flight,omitempty"`
	Capacity uint32 `protobuf:"varint,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
	// The signing keys the engine trusts, as in Hello: they change while
	// the stream is open when the engine reloads its key file.
	TrustedKeyIds []string `protobuf:"bytes,4,rep,name=trusted_key_ids,json=trustedKeyIds,proto3" json:"trusted_key_ids,omitempty"`
	// contains filtered or unexported fields
}

Heartbeat reports the engine's state, every few seconds.

func (*Heartbeat) Descriptor deprecated

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

Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead.

func (*Heartbeat) GetBundleVersion

func (x *Heartbeat) GetBundleVersion() uint64

func (*Heartbeat) GetCapacity

func (x *Heartbeat) GetCapacity() uint32

func (*Heartbeat) GetInFlight

func (x *Heartbeat) GetInFlight() uint32

func (*Heartbeat) GetTrustedKeyIds added in v0.1.1

func (x *Heartbeat) GetTrustedKeyIds() []string

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) ProtoReflect

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

func (*Heartbeat) Reset

func (x *Heartbeat) Reset()

func (*Heartbeat) String

func (x *Heartbeat) String() string

type Hello

type Hello struct {

	// Unique per engine process.
	EngineId string `protobuf:"bytes,1,opt,name=engine_id,json=engineId,proto3" json:"engine_id,omitempty"`
	// The engine's pod.
	PodNamespace string `protobuf:"bytes,2,opt,name=pod_namespace,json=podNamespace,proto3" json:"pod_namespace,omitempty"`
	PodName      string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"`
	NodeName     string `protobuf:"bytes,4,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	// The bundle the engine runs (0: none): the operator skips sending it
	// again when it is current.
	BundleVersion uint64 `protobuf:"varint,5,opt,name=bundle_version,json=bundleVersion,proto3" json:"bundle_version,omitempty"`
	// The engine's version.
	EngineVersion string `protobuf:"bytes,6,opt,name=engine_version,json=engineVersion,proto3" json:"engine_version,omitempty"`
	// The IDs of the bundle signing keys the engine trusts (SignedBundle
	// key_id), so the operator signs with a new key only once every engine
	// has it. Empty from engines that predate key rotation.
	TrustedKeyIds []string `protobuf:"bytes,7,rep,name=trusted_key_ids,json=trustedKeyIds,proto3" json:"trusted_key_ids,omitempty"`
	// contains filtered or unexported fields
}

Hello opens the stream.

func (*Hello) Descriptor deprecated

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

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetBundleVersion

func (x *Hello) GetBundleVersion() uint64

func (*Hello) GetEngineId

func (x *Hello) GetEngineId() string

func (*Hello) GetEngineVersion

func (x *Hello) GetEngineVersion() string

func (*Hello) GetNodeName

func (x *Hello) GetNodeName() string

func (*Hello) GetPodName

func (x *Hello) GetPodName() string

func (*Hello) GetPodNamespace

func (x *Hello) GetPodNamespace() string

func (*Hello) GetTrustedKeyIds added in v0.1.1

func (x *Hello) GetTrustedKeyIds() []string

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

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

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

type Nack

type Nack struct {
	BundleVersion uint64 `protobuf:"varint,1,opt,name=bundle_version,json=bundleVersion,proto3" json:"bundle_version,omitempty"`
	// Why, e.g. a bad signature or a rule that doesn't compile.
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Nack reports a bundle the engine rejected; it keeps running the previous one.

func (*Nack) Descriptor deprecated

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

Deprecated: Use Nack.ProtoReflect.Descriptor instead.

func (*Nack) GetBundleVersion

func (x *Nack) GetBundleVersion() uint64

func (*Nack) GetError

func (x *Nack) GetError() string

func (*Nack) ProtoMessage

func (*Nack) ProtoMessage()

func (*Nack) ProtoReflect

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

func (*Nack) Reset

func (x *Nack) Reset()

func (*Nack) String

func (x *Nack) String() string

type UnimplementedBundleServiceServer

type UnimplementedBundleServiceServer struct{}

UnimplementedBundleServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedBundleServiceServer) Watch

type UnsafeBundleServiceServer

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

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

type WatchRequest

type WatchRequest struct {

	// Types that are valid to be assigned to Msg:
	//
	//	*WatchRequest_Hello
	//	*WatchRequest_Ack
	//	*WatchRequest_Nack
	//	*WatchRequest_Heartbeat
	//	*WatchRequest_Events
	//	*WatchRequest_Stats
	Msg isWatchRequest_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

WatchRequest is a message from the engine (EngineMessage in 0002 §5.2).

func (*WatchRequest) Descriptor deprecated

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

Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.

func (*WatchRequest) GetAck

func (x *WatchRequest) GetAck() *Ack

func (*WatchRequest) GetEvents added in v0.1.1

func (x *WatchRequest) GetEvents() *v1.EventBatch

func (*WatchRequest) GetHeartbeat

func (x *WatchRequest) GetHeartbeat() *Heartbeat

func (*WatchRequest) GetHello

func (x *WatchRequest) GetHello() *Hello

func (*WatchRequest) GetMsg

func (x *WatchRequest) GetMsg() isWatchRequest_Msg

func (*WatchRequest) GetNack

func (x *WatchRequest) GetNack() *Nack

func (*WatchRequest) GetStats added in v0.3.0

func (x *WatchRequest) GetStats() *v1.RequestStats

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) ProtoReflect

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

func (*WatchRequest) Reset

func (x *WatchRequest) Reset()

func (*WatchRequest) String

func (x *WatchRequest) String() string

type WatchRequest_Ack

type WatchRequest_Ack struct {
	Ack *Ack `protobuf:"bytes,2,opt,name=ack,proto3,oneof"`
}

type WatchRequest_Events added in v0.1.1

type WatchRequest_Events struct {
	// Security events (0002 §5.4), redacted, in order of time, at most
	// 1,000 per batch. Best effort: an engine keeps a bounded buffer and
	// drops the oldest when it is full, counted in the next batch.
	Events *v1.EventBatch `protobuf:"bytes,5,opt,name=events,proto3,oneof"`
}

type WatchRequest_Heartbeat

type WatchRequest_Heartbeat struct {
	Heartbeat *Heartbeat `protobuf:"bytes,4,opt,name=heartbeat,proto3,oneof"`
}

type WatchRequest_Hello

type WatchRequest_Hello struct {
	Hello *Hello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}

type WatchRequest_Nack

type WatchRequest_Nack struct {
	Nack *Nack `protobuf:"bytes,3,opt,name=nack,proto3,oneof"`
}

type WatchRequest_Stats added in v0.3.0

type WatchRequest_Stats struct {
	// Requests per policy (0002 §5.4), with the heartbeats. Cumulative over
	// the stream: the first report on a stream counts from zero, and also
	// has what the engine counted after its last report on the previous
	// one. So the operator adds up the differences between reports, and an
	// engine that moves to another replica, or restarts, is never counted
	// twice. A report is split into messages of at most 32 KiB, each with
	// different policies; only policies whose counts changed are sent.
	Stats *v1.RequestStats `protobuf:"bytes,6,opt,name=stats,proto3,oneof"`
}

type WatchResponse

type WatchResponse struct {

	// Types that are valid to be assigned to Msg:
	//
	//	*WatchResponse_Bundle
	Msg isWatchResponse_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

WatchResponse is a message from the operator (OperatorMessage in 0002 §5.2).

func (*WatchResponse) Descriptor deprecated

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

Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.

func (*WatchResponse) GetBundle

func (x *WatchResponse) GetBundle() *v11.SignedBundle

func (*WatchResponse) GetMsg

func (x *WatchResponse) GetMsg() isWatchResponse_Msg

func (*WatchResponse) ProtoMessage

func (*WatchResponse) ProtoMessage()

func (*WatchResponse) ProtoReflect

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

func (*WatchResponse) Reset

func (x *WatchResponse) Reset()

func (*WatchResponse) String

func (x *WatchResponse) String() string

type WatchResponse_Bundle

type WatchResponse_Bundle struct {
	Bundle *v11.SignedBundle `protobuf:"bytes,1,opt,name=bundle,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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