event

package
v3.3.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Overview

Package event is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)

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) MarshalTo

func (m *EventRequest) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *EventResponse) MarshalTo(dAtA []byte) (int, 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 (*ListWorkflowEventBindingsRequest) Size

func (m *ListWorkflowEventBindingsRequest) Size() (n int)

func (*ListWorkflowEventBindingsRequest) 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 (*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) ReceiveEvent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL