Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEventStreamServiceServer(s grpc.ServiceRegistrar, srv EventStreamServiceServer)
- type ContainerInfo
- func (*ContainerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ContainerInfo) GetEnv() map[string]string
- func (x *ContainerInfo) GetId() string
- func (x *ContainerInfo) GetName() string
- func (*ContainerInfo) ProtoMessage()
- func (x *ContainerInfo) ProtoReflect() protoreflect.Message
- func (x *ContainerInfo) Reset()
- func (x *ContainerInfo) String() string
- type Event
- type EventStreamServiceClient
- type EventStreamServiceServer
- type EventStreamService_SubscribeClient
- type EventStreamService_SubscribeServer
- type EventType
- type ObjectMeta
- func (*ObjectMeta) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectMeta) GetIps() []string
- func (x *ObjectMeta) GetKind() string
- func (x *ObjectMeta) GetLabels() map[string]string
- func (x *ObjectMeta) GetName() string
- func (x *ObjectMeta) GetNamespace() string
- func (x *ObjectMeta) GetPod() *PodInfo
- func (*ObjectMeta) ProtoMessage()
- func (x *ObjectMeta) ProtoReflect() protoreflect.Message
- func (x *ObjectMeta) Reset()
- func (x *ObjectMeta) String() string
- type Owner
- type PodInfo
- func (*PodInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PodInfo) GetContainers() []*ContainerInfo
- func (x *PodInfo) GetHostIp() string
- func (x *PodInfo) GetNodeName() string
- func (x *PodInfo) GetOwners() []*Owner
- func (x *PodInfo) GetStartTimeStr() string
- func (x *PodInfo) GetUid() string
- func (*PodInfo) ProtoMessage()
- func (x *PodInfo) ProtoReflect() protoreflect.Message
- func (x *PodInfo) Reset()
- func (x *PodInfo) String() string
- type SubscribeMessage
- type UnimplementedEventStreamServiceServer
- type UnsafeEventStreamServiceServer
Constants ¶
const (
EventStreamService_Subscribe_FullMethodName = "/informer.EventStreamService/Subscribe"
)
Variables ¶
var ( EventType_name = map[int32]string{ 0: "CREATED", 1: "UPDATED", 2: "DELETED", 3: "SYNC_FINISHED", } EventType_value = map[string]int32{ "CREATED": 0, "UPDATED": 1, "DELETED": 2, "SYNC_FINISHED": 3, } )
Enum value maps for EventType.
var EventStreamService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "informer.EventStreamService", HandlerType: (*EventStreamServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _EventStreamService_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "proto/informer.proto", }
EventStreamService_ServiceDesc is the grpc.ServiceDesc for EventStreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_informer_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventStreamServiceServer ¶
func RegisterEventStreamServiceServer(s grpc.ServiceRegistrar, srv EventStreamServiceServer)
Types ¶
type ContainerInfo ¶
type ContainerInfo struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Env map[string]string `` /* 147-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ContainerInfo) Descriptor
deprecated
func (*ContainerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ContainerInfo.ProtoReflect.Descriptor instead.
func (*ContainerInfo) GetEnv ¶
func (x *ContainerInfo) GetEnv() map[string]string
func (*ContainerInfo) GetId ¶
func (x *ContainerInfo) GetId() string
func (*ContainerInfo) GetName ¶
func (x *ContainerInfo) GetName() string
func (*ContainerInfo) ProtoMessage ¶
func (*ContainerInfo) ProtoMessage()
func (*ContainerInfo) ProtoReflect ¶
func (x *ContainerInfo) ProtoReflect() protoreflect.Message
func (*ContainerInfo) Reset ¶
func (x *ContainerInfo) Reset()
func (*ContainerInfo) String ¶
func (x *ContainerInfo) String() string
type Event ¶
type Event struct { // Todo: add timestamp: // - avoids out-of-order events coming from different informers (local vs remote) // - on failure/reconnection you don't need to receive all the events again Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=informer.EventType" json:"type,omitempty"` Resource *ObjectMeta `protobuf:"bytes,2,opt,name=resource,proto3,oneof" json:"resource,omitempty"` // contains filtered or unexported fields }
Event represents a single event.
func (*Event) Descriptor
deprecated
func (*Event) GetResource ¶
func (x *Event) GetResource() *ObjectMeta
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventStreamServiceClient ¶
type EventStreamServiceClient interface { // Subscribe allows clients to subscribe to a stream of events. Subscribe(ctx context.Context, in *SubscribeMessage, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Event], error) }
EventStreamServiceClient is the client API for EventStreamService 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.
EventStreamService defines the gRPC service for event streaming.
func NewEventStreamServiceClient ¶
func NewEventStreamServiceClient(cc grpc.ClientConnInterface) EventStreamServiceClient
type EventStreamServiceServer ¶
type EventStreamServiceServer interface { // Subscribe allows clients to subscribe to a stream of events. Subscribe(*SubscribeMessage, grpc.ServerStreamingServer[Event]) error // contains filtered or unexported methods }
EventStreamServiceServer is the server API for EventStreamService service. All implementations must embed UnimplementedEventStreamServiceServer for forward compatibility.
EventStreamService defines the gRPC service for event streaming.
type EventStreamService_SubscribeClient ¶
type EventStreamService_SubscribeClient = grpc.ServerStreamingClient[Event]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type EventStreamService_SubscribeServer ¶
type EventStreamService_SubscribeServer = grpc.ServerStreamingServer[Event]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type EventType ¶
type EventType int32
EventType represents the type of event.
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type ObjectMeta ¶
type ObjectMeta struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ Ips []string `protobuf:"bytes,4,rep,name=ips,proto3" json:"ips,omitempty"` Kind string `protobuf:"bytes,5,opt,name=kind,proto3" json:"kind,omitempty"` // If the Kube object is not a Pod, this field will be empty. Pod *PodInfo `protobuf:"bytes,6,opt,name=pod,proto3,oneof" json:"pod,omitempty"` // contains filtered or unexported fields }
func (*ObjectMeta) Descriptor
deprecated
func (*ObjectMeta) Descriptor() ([]byte, []int)
Deprecated: Use ObjectMeta.ProtoReflect.Descriptor instead.
func (*ObjectMeta) GetIps ¶
func (x *ObjectMeta) GetIps() []string
func (*ObjectMeta) GetKind ¶
func (x *ObjectMeta) GetKind() string
func (*ObjectMeta) GetLabels ¶
func (x *ObjectMeta) GetLabels() map[string]string
func (*ObjectMeta) GetName ¶
func (x *ObjectMeta) GetName() string
func (*ObjectMeta) GetNamespace ¶
func (x *ObjectMeta) GetNamespace() string
func (*ObjectMeta) GetPod ¶
func (x *ObjectMeta) GetPod() *PodInfo
func (*ObjectMeta) ProtoMessage ¶
func (*ObjectMeta) ProtoMessage()
func (*ObjectMeta) ProtoReflect ¶
func (x *ObjectMeta) ProtoReflect() protoreflect.Message
func (*ObjectMeta) Reset ¶
func (x *ObjectMeta) Reset()
func (*ObjectMeta) String ¶
func (x *ObjectMeta) String() string
type Owner ¶
type Owner struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // contains filtered or unexported fields }
func (*Owner) Descriptor
deprecated
func (*Owner) ProtoMessage ¶
func (*Owner) ProtoMessage()
func (*Owner) ProtoReflect ¶
func (x *Owner) ProtoReflect() protoreflect.Message
type PodInfo ¶
type PodInfo struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` StartTimeStr string `protobuf:"bytes,3,opt,name=start_time_str,json=startTimeStr,proto3" json:"start_time_str,omitempty"` HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"` Containers []*ContainerInfo `protobuf:"bytes,5,rep,name=containers,proto3" json:"containers,omitempty"` Owners []*Owner `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty"` // contains filtered or unexported fields }
func (*PodInfo) Descriptor
deprecated
func (*PodInfo) GetContainers ¶
func (x *PodInfo) GetContainers() []*ContainerInfo
func (*PodInfo) GetNodeName ¶
func (*PodInfo) GetStartTimeStr ¶
func (*PodInfo) ProtoMessage ¶
func (*PodInfo) ProtoMessage()
func (*PodInfo) ProtoReflect ¶
func (x *PodInfo) ProtoReflect() protoreflect.Message
type SubscribeMessage ¶
type SubscribeMessage struct {
// contains filtered or unexported fields
}
Empty message for Subscribe RPC
func (*SubscribeMessage) Descriptor
deprecated
func (*SubscribeMessage) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeMessage.ProtoReflect.Descriptor instead.
func (*SubscribeMessage) ProtoMessage ¶
func (*SubscribeMessage) ProtoMessage()
func (*SubscribeMessage) ProtoReflect ¶
func (x *SubscribeMessage) ProtoReflect() protoreflect.Message
func (*SubscribeMessage) Reset ¶
func (x *SubscribeMessage) Reset()
func (*SubscribeMessage) String ¶
func (x *SubscribeMessage) String() string
type UnimplementedEventStreamServiceServer ¶
type UnimplementedEventStreamServiceServer struct{}
UnimplementedEventStreamServiceServer 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 (UnimplementedEventStreamServiceServer) Subscribe ¶
func (UnimplementedEventStreamServiceServer) Subscribe(*SubscribeMessage, grpc.ServerStreamingServer[Event]) error
type UnsafeEventStreamServiceServer ¶
type UnsafeEventStreamServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEventStreamServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventStreamServiceServer will result in compilation errors.