Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterBundleServiceServer(s grpc.ServiceRegistrar, srv BundleServiceServer)
- type Ack
- type BundleServiceClient
- type BundleServiceServer
- type BundleService_WatchClient
- type BundleService_WatchServer
- type Heartbeat
- func (*Heartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *Heartbeat) GetBundleVersion() uint64
- func (x *Heartbeat) GetCapacity() uint32
- func (x *Heartbeat) GetInFlight() uint32
- func (*Heartbeat) ProtoMessage()
- func (x *Heartbeat) ProtoReflect() protoreflect.Message
- func (x *Heartbeat) Reset()
- func (x *Heartbeat) String() string
- type Hello
- func (*Hello) Descriptor() ([]byte, []int)deprecated
- func (x *Hello) GetBundleVersion() uint64
- func (x *Hello) GetEngineId() string
- func (x *Hello) GetEngineVersion() string
- func (x *Hello) GetNodeName() string
- func (x *Hello) GetPodName() string
- func (x *Hello) GetPodNamespace() string
- func (*Hello) ProtoMessage()
- func (x *Hello) ProtoReflect() protoreflect.Message
- func (x *Hello) Reset()
- func (x *Hello) String() string
- type Nack
- type UnimplementedBundleServiceServer
- type UnsafeBundleServiceServer
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetAck() *Ack
- func (x *WatchRequest) GetHeartbeat() *Heartbeat
- func (x *WatchRequest) GetHello() *Hello
- func (x *WatchRequest) GetMsg() isWatchRequest_Msg
- func (x *WatchRequest) GetNack() *Nack
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
- type WatchRequest_Ack
- type WatchRequest_Heartbeat
- type WatchRequest_Hello
- type WatchRequest_Nack
- type WatchResponse
- func (*WatchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchResponse) GetBundle() *v1.SignedBundle
- func (x *WatchResponse) GetMsg() isWatchResponse_Msg
- func (*WatchResponse) ProtoMessage()
- func (x *WatchResponse) ProtoReflect() protoreflect.Message
- func (x *WatchResponse) Reset()
- func (x *WatchResponse) String() string
- type WatchResponse_Bundle
Constants ¶
const (
BundleService_Watch_FullMethodName = "/inkwall.agent.v1.BundleService/Watch"
)
Variables ¶
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)
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) GetBundleVersion ¶
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
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.
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.
func NewBundleServiceClient ¶
func NewBundleServiceClient(cc grpc.ClientConnInterface) BundleServiceClient
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.
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"`
// contains filtered or unexported fields
}
Heartbeat reports the engine's state, every few seconds.
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) GetBundleVersion ¶
func (*Heartbeat) GetCapacity ¶
func (*Heartbeat) GetInFlight ¶
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
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"`
// contains filtered or unexported fields
}
Hello opens the stream.
func (*Hello) Descriptor
deprecated
func (*Hello) GetBundleVersion ¶
func (*Hello) GetEngineId ¶
func (*Hello) GetEngineVersion ¶
func (*Hello) GetNodeName ¶
func (*Hello) GetPodName ¶
func (*Hello) GetPodNamespace ¶
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
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) GetBundleVersion ¶
func (*Nack) ProtoMessage ¶
func (*Nack) ProtoMessage()
func (*Nack) ProtoReflect ¶
func (x *Nack) ProtoReflect() protoreflect.Message
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.
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
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) 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) 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_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 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() *v1.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 *v1.SignedBundle `protobuf:"bytes,1,opt,name=bundle,proto3,oneof"`
}