Documentation
¶
Overview ¶
Package events defines the event pushing and subscription service.
Index ¶
- Variables
- func RegisterEventsServer(s *grpc.Server, srv EventsServer)
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)
- func (m *Envelope) Field(fieldpath []string) (string, bool)
- func (m *Envelope) Marshal() (dAtA []byte, err error)
- func (m *Envelope) MarshalTo(dAtA []byte) (int, error)
- func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (m *Envelope) Size() (n int)
- func (this *Envelope) String() string
- func (m *Envelope) Unmarshal(dAtA []byte) error
- func (m *Envelope) XXX_DiscardUnknown()
- func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Envelope) XXX_Merge(src proto.Message)
- func (m *Envelope) XXX_Size() int
- func (m *Envelope) XXX_Unmarshal(b []byte) error
- type EventsClient
- type EventsServer
- type Events_SubscribeClient
- type Events_SubscribeServer
- type ForwardRequest
- func (*ForwardRequest) Descriptor() ([]byte, []int)
- func (m *ForwardRequest) Marshal() (dAtA []byte, err error)
- func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ForwardRequest) ProtoMessage()
- func (m *ForwardRequest) Reset()
- func (m *ForwardRequest) Size() (n int)
- func (this *ForwardRequest) String() string
- func (m *ForwardRequest) Unmarshal(dAtA []byte) error
- func (m *ForwardRequest) XXX_DiscardUnknown()
- func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForwardRequest) XXX_Merge(src proto.Message)
- func (m *ForwardRequest) XXX_Size() int
- func (m *ForwardRequest) XXX_Unmarshal(b []byte) error
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)
- func (m *PublishRequest) Marshal() (dAtA []byte, err error)
- func (m *PublishRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *PublishRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PublishRequest) ProtoMessage()
- func (m *PublishRequest) Reset()
- func (m *PublishRequest) Size() (n int)
- func (this *PublishRequest) String() string
- func (m *PublishRequest) Unmarshal(dAtA []byte) error
- func (m *PublishRequest) XXX_DiscardUnknown()
- func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PublishRequest) XXX_Merge(src proto.Message)
- func (m *PublishRequest) XXX_Size() int
- func (m *PublishRequest) XXX_Unmarshal(b []byte) error
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)
- func (m *SubscribeRequest) Marshal() (dAtA []byte, err error)
- func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SubscribeRequest) ProtoMessage()
- func (m *SubscribeRequest) Reset()
- func (m *SubscribeRequest) Size() (n int)
- func (this *SubscribeRequest) String() string
- func (m *SubscribeRequest) Unmarshal(dAtA []byte) error
- func (m *SubscribeRequest) XXX_DiscardUnknown()
- func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubscribeRequest) XXX_Merge(src proto.Message)
- func (m *SubscribeRequest) XXX_Size() int
- func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedEventsServer
- func (*UnimplementedEventsServer) Forward(ctx context.Context, req *ForwardRequest) (*types.Empty, error)
- func (*UnimplementedEventsServer) Publish(ctx context.Context, req *PublishRequest) (*types.Empty, error)
- func (*UnimplementedEventsServer) Subscribe(req *SubscribeRequest, srv Events_SubscribeServer) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterEventsServer ¶
func RegisterEventsServer(s *grpc.Server, srv EventsServer)
Types ¶
type Envelope ¶
type Envelope struct {
Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
Event *types.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Envelope) Descriptor ¶
func (*Envelope) Field ¶
Field returns the value for the given fieldpath as a string, if defined. If the value is not defined, the second value will be false.
func (*Envelope) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *Envelope) XXX_DiscardUnknown()
func (*Envelope) XXX_Marshal ¶ added in v1.3.0
func (*Envelope) XXX_Unmarshal ¶ added in v1.3.0
type EventsClient ¶
type EventsClient interface {
// Publish an event to a topic.
//
// The event will be packed into a timestamp envelope with the namespace
// introspected from the context. The envelope will then be dispatched.
Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*types.Empty, error)
// Forward sends an event that has already been packaged into an envelope
// with a timestamp and namespace.
//
// This is useful if earlier timestamping is required or when forwarding on
// behalf of another component, namespace or publisher.
Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*types.Empty, error)
// Subscribe to a stream of events, possibly returning only that match any
// of the provided filters.
//
// Unlike many other methods in containerd, subscribers will get messages
// from all namespaces unless otherwise specified. If this is not desired,
// a filter can be provided in the format 'namespace==<namespace>' to
// restrict the received events.
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Events_SubscribeClient, error)
}
EventsClient is the client API for Events service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventsClient ¶
func NewEventsClient(cc *grpc.ClientConn) EventsClient
type EventsServer ¶
type EventsServer interface {
// Publish an event to a topic.
//
// The event will be packed into a timestamp envelope with the namespace
// introspected from the context. The envelope will then be dispatched.
Publish(context.Context, *PublishRequest) (*types.Empty, error)
// Forward sends an event that has already been packaged into an envelope
// with a timestamp and namespace.
//
// This is useful if earlier timestamping is required or when forwarding on
// behalf of another component, namespace or publisher.
Forward(context.Context, *ForwardRequest) (*types.Empty, error)
// Subscribe to a stream of events, possibly returning only that match any
// of the provided filters.
//
// Unlike many other methods in containerd, subscribers will get messages
// from all namespaces unless otherwise specified. If this is not desired,
// a filter can be provided in the format 'namespace==<namespace>' to
// restrict the received events.
Subscribe(*SubscribeRequest, Events_SubscribeServer) error
}
EventsServer is the server API for Events service.
type Events_SubscribeClient ¶
type Events_SubscribeClient interface {
Recv() (*Envelope, error)
grpc.ClientStream
}
type Events_SubscribeServer ¶
type Events_SubscribeServer interface {
Send(*Envelope) error
grpc.ServerStream
}
type ForwardRequest ¶
type ForwardRequest struct {
Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ForwardRequest) Descriptor ¶
func (*ForwardRequest) Descriptor() ([]byte, []int)
func (*ForwardRequest) Marshal ¶
func (m *ForwardRequest) Marshal() (dAtA []byte, err error)
func (*ForwardRequest) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *ForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ForwardRequest) ProtoMessage ¶
func (*ForwardRequest) ProtoMessage()
func (*ForwardRequest) Reset ¶
func (m *ForwardRequest) Reset()
func (*ForwardRequest) Size ¶
func (m *ForwardRequest) Size() (n int)
func (*ForwardRequest) String ¶
func (this *ForwardRequest) String() string
func (*ForwardRequest) Unmarshal ¶
func (m *ForwardRequest) Unmarshal(dAtA []byte) error
func (*ForwardRequest) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *ForwardRequest) XXX_DiscardUnknown()
func (*ForwardRequest) XXX_Marshal ¶ added in v1.3.0
func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ForwardRequest) XXX_Merge ¶ added in v1.3.0
func (m *ForwardRequest) XXX_Merge(src proto.Message)
func (*ForwardRequest) XXX_Size ¶ added in v1.3.0
func (m *ForwardRequest) XXX_Size() int
func (*ForwardRequest) XXX_Unmarshal ¶ added in v1.3.0
func (m *ForwardRequest) XXX_Unmarshal(b []byte) error
type PublishRequest ¶
type PublishRequest struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Event *types.Any `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PublishRequest) Descriptor ¶
func (*PublishRequest) Descriptor() ([]byte, []int)
func (*PublishRequest) Marshal ¶
func (m *PublishRequest) Marshal() (dAtA []byte, err error)
func (*PublishRequest) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *PublishRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) Reset ¶
func (m *PublishRequest) Reset()
func (*PublishRequest) Size ¶
func (m *PublishRequest) Size() (n int)
func (*PublishRequest) String ¶
func (this *PublishRequest) String() string
func (*PublishRequest) Unmarshal ¶
func (m *PublishRequest) Unmarshal(dAtA []byte) error
func (*PublishRequest) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *PublishRequest) XXX_DiscardUnknown()
func (*PublishRequest) XXX_Marshal ¶ added in v1.3.0
func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PublishRequest) XXX_Merge ¶ added in v1.3.0
func (m *PublishRequest) XXX_Merge(src proto.Message)
func (*PublishRequest) XXX_Size ¶ added in v1.3.0
func (m *PublishRequest) XXX_Size() int
func (*PublishRequest) XXX_Unmarshal ¶ added in v1.3.0
func (m *PublishRequest) XXX_Unmarshal(b []byte) error
type SubscribeRequest ¶
type SubscribeRequest struct {
Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*SubscribeRequest) Descriptor ¶
func (*SubscribeRequest) Descriptor() ([]byte, []int)
func (*SubscribeRequest) Marshal ¶
func (m *SubscribeRequest) Marshal() (dAtA []byte, err error)
func (*SubscribeRequest) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) Reset ¶
func (m *SubscribeRequest) Reset()
func (*SubscribeRequest) Size ¶
func (m *SubscribeRequest) Size() (n int)
func (*SubscribeRequest) String ¶
func (this *SubscribeRequest) String() string
func (*SubscribeRequest) Unmarshal ¶
func (m *SubscribeRequest) Unmarshal(dAtA []byte) error
func (*SubscribeRequest) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *SubscribeRequest) XXX_DiscardUnknown()
func (*SubscribeRequest) XXX_Marshal ¶ added in v1.3.0
func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubscribeRequest) XXX_Merge ¶ added in v1.3.0
func (m *SubscribeRequest) XXX_Merge(src proto.Message)
func (*SubscribeRequest) XXX_Size ¶ added in v1.3.0
func (m *SubscribeRequest) XXX_Size() int
func (*SubscribeRequest) XXX_Unmarshal ¶ added in v1.3.0
func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error
type UnimplementedEventsServer ¶ added in v1.4.0
type UnimplementedEventsServer struct {
}
UnimplementedEventsServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventsServer) Forward ¶ added in v1.4.0
func (*UnimplementedEventsServer) Forward(ctx context.Context, req *ForwardRequest) (*types.Empty, error)
func (*UnimplementedEventsServer) Publish ¶ added in v1.4.0
func (*UnimplementedEventsServer) Publish(ctx context.Context, req *PublishRequest) (*types.Empty, error)
func (*UnimplementedEventsServer) Subscribe ¶ added in v1.4.0
func (*UnimplementedEventsServer) Subscribe(req *SubscribeRequest, srv Events_SubscribeServer) error
Click to show internal directories.
Click to hide internal directories.