Documentation ¶
Overview ¶
Package event is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
- func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
- func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
- type EventRequest
- func (*EventRequest) Descriptor() ([]byte, []int)
- func (m *EventRequest) GetDiscriminator() string
- func (m *EventRequest) GetNamespace() string
- func (m *EventRequest) GetPayload() *v1alpha1.Item
- func (m *EventRequest) Marshal() (dAtA []byte, err error)
- func (m *EventRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *EventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventRequest) ProtoMessage()
- func (m *EventRequest) Reset()
- func (m *EventRequest) Size() (n int)
- func (m *EventRequest) String() string
- func (m *EventRequest) Unmarshal(dAtA []byte) error
- func (m *EventRequest) XXX_DiscardUnknown()
- func (m *EventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRequest) XXX_Merge(src proto.Message)
- func (m *EventRequest) XXX_Size() int
- func (m *EventRequest) XXX_Unmarshal(b []byte) error
- type EventResponse
- func (*EventResponse) Descriptor() ([]byte, []int)
- func (m *EventResponse) Marshal() (dAtA []byte, err error)
- func (m *EventResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *EventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventResponse) ProtoMessage()
- func (m *EventResponse) Reset()
- func (m *EventResponse) Size() (n int)
- func (m *EventResponse) String() string
- func (m *EventResponse) Unmarshal(dAtA []byte) error
- func (m *EventResponse) XXX_DiscardUnknown()
- func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventResponse) XXX_Merge(src proto.Message)
- func (m *EventResponse) XXX_Size() int
- func (m *EventResponse) XXX_Unmarshal(b []byte) error
- type EventServiceClient
- type EventServiceServer
- type ListWorkflowEventBindingsRequest
- func (*ListWorkflowEventBindingsRequest) Descriptor() ([]byte, []int)
- func (m *ListWorkflowEventBindingsRequest) GetListOptions() *v1.ListOptions
- func (m *ListWorkflowEventBindingsRequest) GetNamespace() string
- func (m *ListWorkflowEventBindingsRequest) Marshal() (dAtA []byte, err error)
- func (m *ListWorkflowEventBindingsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListWorkflowEventBindingsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListWorkflowEventBindingsRequest) ProtoMessage()
- func (m *ListWorkflowEventBindingsRequest) Reset()
- func (m *ListWorkflowEventBindingsRequest) Size() (n int)
- func (m *ListWorkflowEventBindingsRequest) String() string
- func (m *ListWorkflowEventBindingsRequest) Unmarshal(dAtA []byte) error
- func (m *ListWorkflowEventBindingsRequest) XXX_DiscardUnknown()
- func (m *ListWorkflowEventBindingsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListWorkflowEventBindingsRequest) XXX_Merge(src proto.Message)
- func (m *ListWorkflowEventBindingsRequest) XXX_Size() int
- func (m *ListWorkflowEventBindingsRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedEventServiceServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterEventServiceHandler ¶
func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventServiceHandler registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventServiceHandlerClient ¶
func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
RegisterEventServiceHandlerClient registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventServiceClient" to call the correct interceptors.
func RegisterEventServiceHandlerFromEndpoint ¶
func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventServiceHandlerFromEndpoint is same as RegisterEventServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventServiceHandlerServer ¶
func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
RegisterEventServiceHandlerServer registers the http handlers for service EventService to "mux". UnaryRPC :call EventServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventServiceHandlerFromEndpoint instead.
func RegisterEventServiceServer ¶
func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
Types ¶
type EventRequest ¶
type EventRequest struct { // The namespace for the event. This can be empty if the client has cluster scoped permissions. // If empty, then the event is "broadcast" to workflow event binding in all namespaces. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Optional discriminator for the event. This should almost always be empty. // Used for edge-cases where the event payload alone is not provide enough information to discriminate the event. // This MUST NOT be used as security mechanism, e.g. to allow two clients to use the same access token, or // to support webhooks on unsecured server. Instead, use access tokens. // This is made available as `discriminator` in the event binding selector (`/spec/event/selector)` Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` // The event itself can be any data. Payload *v1alpha1.Item `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EventRequest) Descriptor ¶
func (*EventRequest) Descriptor() ([]byte, []int)
func (*EventRequest) GetDiscriminator ¶
func (m *EventRequest) GetDiscriminator() string
func (*EventRequest) GetNamespace ¶
func (m *EventRequest) GetNamespace() string
func (*EventRequest) GetPayload ¶
func (m *EventRequest) GetPayload() *v1alpha1.Item
func (*EventRequest) Marshal ¶
func (m *EventRequest) Marshal() (dAtA []byte, err error)
func (*EventRequest) MarshalToSizedBuffer ¶
func (m *EventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventRequest) ProtoMessage ¶
func (*EventRequest) ProtoMessage()
func (*EventRequest) Reset ¶
func (m *EventRequest) Reset()
func (*EventRequest) Size ¶
func (m *EventRequest) Size() (n int)
func (*EventRequest) String ¶
func (m *EventRequest) String() string
func (*EventRequest) Unmarshal ¶
func (m *EventRequest) Unmarshal(dAtA []byte) error
func (*EventRequest) XXX_DiscardUnknown ¶
func (m *EventRequest) XXX_DiscardUnknown()
func (*EventRequest) XXX_Marshal ¶
func (m *EventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRequest) XXX_Merge ¶
func (m *EventRequest) XXX_Merge(src proto.Message)
func (*EventRequest) XXX_Size ¶
func (m *EventRequest) XXX_Size() int
func (*EventRequest) XXX_Unmarshal ¶
func (m *EventRequest) XXX_Unmarshal(b []byte) error
type EventResponse ¶
type EventResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EventResponse) Descriptor ¶
func (*EventResponse) Descriptor() ([]byte, []int)
func (*EventResponse) Marshal ¶
func (m *EventResponse) Marshal() (dAtA []byte, err error)
func (*EventResponse) MarshalToSizedBuffer ¶
func (m *EventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventResponse) ProtoMessage ¶
func (*EventResponse) ProtoMessage()
func (*EventResponse) Reset ¶
func (m *EventResponse) Reset()
func (*EventResponse) Size ¶
func (m *EventResponse) Size() (n int)
func (*EventResponse) String ¶
func (m *EventResponse) String() string
func (*EventResponse) Unmarshal ¶
func (m *EventResponse) Unmarshal(dAtA []byte) error
func (*EventResponse) XXX_DiscardUnknown ¶
func (m *EventResponse) XXX_DiscardUnknown()
func (*EventResponse) XXX_Marshal ¶
func (m *EventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventResponse) XXX_Merge ¶
func (m *EventResponse) XXX_Merge(src proto.Message)
func (*EventResponse) XXX_Size ¶
func (m *EventResponse) XXX_Size() int
func (*EventResponse) XXX_Unmarshal ¶
func (m *EventResponse) XXX_Unmarshal(b []byte) error
type EventServiceClient ¶
type EventServiceClient interface { ReceiveEvent(ctx context.Context, in *EventRequest, opts ...grpc.CallOption) (*EventResponse, error) ListWorkflowEventBindings(ctx context.Context, in *ListWorkflowEventBindingsRequest, opts ...grpc.CallOption) (*v1alpha1.WorkflowEventBindingList, error) }
EventServiceClient is the client API for EventService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventServiceClient ¶
func NewEventServiceClient(cc *grpc.ClientConn) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface { ReceiveEvent(context.Context, *EventRequest) (*EventResponse, error) ListWorkflowEventBindings(context.Context, *ListWorkflowEventBindingsRequest) (*v1alpha1.WorkflowEventBindingList, error) }
EventServiceServer is the server API for EventService service.
type ListWorkflowEventBindingsRequest ¶
type ListWorkflowEventBindingsRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` ListOptions *v1.ListOptions `protobuf:"bytes,2,opt,name=listOptions,proto3" json:"listOptions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListWorkflowEventBindingsRequest) Descriptor ¶
func (*ListWorkflowEventBindingsRequest) Descriptor() ([]byte, []int)
func (*ListWorkflowEventBindingsRequest) GetListOptions ¶
func (m *ListWorkflowEventBindingsRequest) GetListOptions() *v1.ListOptions
func (*ListWorkflowEventBindingsRequest) GetNamespace ¶
func (m *ListWorkflowEventBindingsRequest) GetNamespace() string
func (*ListWorkflowEventBindingsRequest) Marshal ¶
func (m *ListWorkflowEventBindingsRequest) Marshal() (dAtA []byte, err error)
func (*ListWorkflowEventBindingsRequest) MarshalTo ¶
func (m *ListWorkflowEventBindingsRequest) MarshalTo(dAtA []byte) (int, error)
func (*ListWorkflowEventBindingsRequest) MarshalToSizedBuffer ¶
func (m *ListWorkflowEventBindingsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListWorkflowEventBindingsRequest) ProtoMessage ¶
func (*ListWorkflowEventBindingsRequest) ProtoMessage()
func (*ListWorkflowEventBindingsRequest) Reset ¶
func (m *ListWorkflowEventBindingsRequest) Reset()
func (*ListWorkflowEventBindingsRequest) Size ¶
func (m *ListWorkflowEventBindingsRequest) Size() (n int)
func (*ListWorkflowEventBindingsRequest) String ¶
func (m *ListWorkflowEventBindingsRequest) String() string
func (*ListWorkflowEventBindingsRequest) Unmarshal ¶
func (m *ListWorkflowEventBindingsRequest) Unmarshal(dAtA []byte) error
func (*ListWorkflowEventBindingsRequest) XXX_DiscardUnknown ¶
func (m *ListWorkflowEventBindingsRequest) XXX_DiscardUnknown()
func (*ListWorkflowEventBindingsRequest) XXX_Marshal ¶
func (m *ListWorkflowEventBindingsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListWorkflowEventBindingsRequest) XXX_Merge ¶
func (m *ListWorkflowEventBindingsRequest) XXX_Merge(src proto.Message)
func (*ListWorkflowEventBindingsRequest) XXX_Size ¶
func (m *ListWorkflowEventBindingsRequest) XXX_Size() int
func (*ListWorkflowEventBindingsRequest) XXX_Unmarshal ¶
func (m *ListWorkflowEventBindingsRequest) XXX_Unmarshal(b []byte) error
type UnimplementedEventServiceServer ¶
type UnimplementedEventServiceServer struct { }
UnimplementedEventServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventServiceServer) ListWorkflowEventBindings ¶
func (*UnimplementedEventServiceServer) ListWorkflowEventBindings(ctx context.Context, req *ListWorkflowEventBindingsRequest) (*v1alpha1.WorkflowEventBindingList, error)
func (*UnimplementedEventServiceServer) ReceiveEvent ¶
func (*UnimplementedEventServiceServer) ReceiveEvent(ctx context.Context, req *EventRequest) (*EventResponse, error)