Documentation
¶
Index ¶
- Variables
- func RegisterEventsServiceServer(s *grpc.Server, srv EventsServiceServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetCreatedAt() *timestamppb.Timestamp
- func (x *Event) GetData() []byte
- func (x *Event) GetEventType() EventType
- func (x *Event) GetId() string
- func (x *Event) GetResourceId() string
- func (x *Event) GetResourceType() ResourceType
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventType
- type EventsServiceClient
- type EventsServiceServer
- type EventsService_WatchClient
- type EventsService_WatchServer
- type ResourceType
- func (ResourceType) Descriptor() protoreflect.EnumDescriptor
- func (x ResourceType) Enum() *ResourceType
- func (ResourceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResourceType) Number() protoreflect.EnumNumber
- func (x ResourceType) String() string
- func (ResourceType) Type() protoreflect.EnumType
- type UnimplementedEventsServiceServer
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetEventTypes() []EventType
- func (x *WatchRequest) GetResourceId() string
- func (x *WatchRequest) GetResourceTypes() []ResourceType
- func (x *WatchRequest) GetWatchEventsFrom() *timestamppb.Timestamp
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ResourceType_name = map[int32]string{ 0: "RESOURCE_TYPE_UNKNOWN", 1: "RESOURCE_TYPE_TEMPLATE", 2: "RESOURCE_TYPE_HARDWARE", 3: "RESOURCE_TYPE_WORKFLOW", } ResourceType_value = map[string]int32{ "RESOURCE_TYPE_UNKNOWN": 0, "RESOURCE_TYPE_TEMPLATE": 1, "RESOURCE_TYPE_HARDWARE": 2, "RESOURCE_TYPE_WORKFLOW": 3, } )
Enum value maps for ResourceType.
var ( EventType_name = map[int32]string{ 0: "EVENT_TYPE_UNKNOWN", 1: "EVENT_TYPE_CREATED", 2: "EVENT_TYPE_UPDATED", 3: "EVENT_TYPE_DELETED", } EventType_value = map[string]int32{ "EVENT_TYPE_UNKNOWN": 0, "EVENT_TYPE_CREATED": 1, "EVENT_TYPE_UPDATED": 2, "EVENT_TYPE_DELETED": 3, } )
Enum value maps for EventType.
var File_events_events_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventsServiceServer ¶
func RegisterEventsServiceServer(s *grpc.Server, srv EventsServiceServer)
Types ¶
type Event ¶
type Event struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ResourceId string `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
ResourceType ResourceType `` /* 157-byte string literal not displayed */
EventType EventType `` /* 145-byte string literal not displayed */
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// contains filtered or unexported fields
}
An event represents a change in the state of a give resource type.
func (*Event) Descriptor
deprecated
func (*Event) GetCreatedAt ¶
func (x *Event) GetCreatedAt() *timestamppb.Timestamp
func (*Event) GetEventType ¶
func (*Event) GetResourceId ¶
func (*Event) GetResourceType ¶
func (x *Event) GetResourceType() ResourceType
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventType ¶
type EventType int32
EventType represents different events that lead to change in state for a given resource.
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 EventsServiceClient ¶
type EventsServiceClient interface {
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (EventsService_WatchClient, error)
}
EventsServiceClient is the client API for EventsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventsServiceClient ¶
func NewEventsServiceClient(cc grpc.ClientConnInterface) EventsServiceClient
type EventsServiceServer ¶
type EventsServiceServer interface {
Watch(*WatchRequest, EventsService_WatchServer) error
}
EventsServiceServer is the server API for EventsService service.
type EventsService_WatchClient ¶
type EventsService_WatchClient interface {
Recv() (*Event, error)
grpc.ClientStream
}
type EventsService_WatchServer ¶
type EventsService_WatchServer interface {
Send(*Event) error
grpc.ServerStream
}
type ResourceType ¶
type ResourceType int32
ResourceType is a resource in Tinkerbell space that has a state, which can change over time.
const ( ResourceType_RESOURCE_TYPE_UNKNOWN ResourceType = 0 ResourceType_RESOURCE_TYPE_TEMPLATE ResourceType = 1 ResourceType_RESOURCE_TYPE_HARDWARE ResourceType = 2 ResourceType_RESOURCE_TYPE_WORKFLOW ResourceType = 3 )
func (ResourceType) Descriptor ¶
func (ResourceType) Descriptor() protoreflect.EnumDescriptor
func (ResourceType) Enum ¶
func (x ResourceType) Enum() *ResourceType
func (ResourceType) EnumDescriptor
deprecated
func (ResourceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResourceType.Descriptor instead.
func (ResourceType) Number ¶
func (x ResourceType) Number() protoreflect.EnumNumber
func (ResourceType) String ¶
func (x ResourceType) String() string
func (ResourceType) Type ¶
func (ResourceType) Type() protoreflect.EnumType
type UnimplementedEventsServiceServer ¶
type UnimplementedEventsServiceServer struct {
}
UnimplementedEventsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventsServiceServer) Watch ¶
func (*UnimplementedEventsServiceServer) Watch(*WatchRequest, EventsService_WatchServer) error
type WatchRequest ¶
type WatchRequest struct {
// Resource ID to watch a specific resource.
ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
// List of EventType(s) consumer wants to watch for.
// An empty list would mean ALL EventType(s).
EventTypes []EventType `` /* 155-byte string literal not displayed */
// List of ResourceType(s) consumer wants to watch for.
// An empty list would mean ALL ResourceType(s).
ResourceTypes []ResourceType `` /* 167-byte string literal not displayed */
// Every consumer when it connects to a stream of events will specify
// how old the events returned should be (by default 5m).
WatchEventsFrom *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=watch_events_from,json=watchEventsFrom,proto3" json:"watch_events_from,omitempty"`
// contains filtered or unexported fields
}
WatchRequest allows cunsumers to customize watch, and only look for certain events on certain resources.
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetEventTypes ¶
func (x *WatchRequest) GetEventTypes() []EventType
func (*WatchRequest) GetResourceId ¶
func (x *WatchRequest) GetResourceId() string
func (*WatchRequest) GetResourceTypes ¶
func (x *WatchRequest) GetResourceTypes() []ResourceType
func (*WatchRequest) GetWatchEventsFrom ¶
func (x *WatchRequest) GetWatchEventsFrom() *timestamppb.Timestamp
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