Documentation ¶
Overview ¶
Package eventgate is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEventGateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventGateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventGateServiceClient) error
- func RegisterEventGateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventGateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventGateServiceServer) error
- func RegisterEventGateServiceServer(s *grpc.Server, srv EventGateServiceServer)
- type CloudEvent
- func (*CloudEvent) Descriptor() ([]byte, []int)deprecated
- func (x *CloudEvent) GetData() *_struct.Struct
- func (x *CloudEvent) GetDataBase64() string
- func (x *CloudEvent) GetDatacontenttype() string
- func (x *CloudEvent) GetDataschema() string
- func (x *CloudEvent) GetEventgateAuth() string
- func (x *CloudEvent) GetId() string
- func (x *CloudEvent) GetSource() string
- func (x *CloudEvent) GetSpecversion() string
- func (x *CloudEvent) GetSubject() string
- func (x *CloudEvent) GetTime() *timestamp.Timestamp
- func (x *CloudEvent) GetType() string
- func (*CloudEvent) ProtoMessage()
- func (x *CloudEvent) ProtoReflect() protoreflect.Message
- func (x *CloudEvent) Reset()
- func (x *CloudEvent) String() string
- func (this *CloudEvent) Validate() error
- type CloudEventInput
- func (*CloudEventInput) Descriptor() ([]byte, []int)deprecated
- func (x *CloudEventInput) GetData() *_struct.Struct
- func (x *CloudEventInput) GetDataBase64() string
- func (x *CloudEventInput) GetDatacontenttype() string
- func (x *CloudEventInput) GetDataschema() string
- func (x *CloudEventInput) GetSource() string
- func (x *CloudEventInput) GetSpecversion() string
- func (x *CloudEventInput) GetSubject() string
- func (x *CloudEventInput) GetType() string
- func (*CloudEventInput) ProtoMessage()
- func (x *CloudEventInput) ProtoReflect() protoreflect.Message
- func (x *CloudEventInput) Reset()
- func (x *CloudEventInput) String() string
- func (this *CloudEventInput) Validate() error
- type EventGateServiceClient
- type EventGateServiceServer
- type EventGateService_ReceiveClient
- type EventGateService_ReceiveServer
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)deprecated
- func (x *Filter) GetSource() string
- func (x *Filter) GetSpecversion() string
- func (x *Filter) GetSubject() string
- func (x *Filter) GetType() string
- func (*Filter) ProtoMessage()
- func (x *Filter) ProtoReflect() protoreflect.Message
- func (x *Filter) Reset()
- func (x *Filter) String() string
- func (this *Filter) Validate() error
- type UnimplementedEventGateServiceServer
- func (*UnimplementedEventGateServiceServer) Receive(*Filter, EventGateService_ReceiveServer) error
- func (*UnimplementedEventGateServiceServer) Request(context.Context, *CloudEventInput) (*CloudEvent, error)
- func (*UnimplementedEventGateServiceServer) Send(context.Context, *CloudEventInput) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventGateServiceHandler ¶ added in v0.0.6
func RegisterEventGateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventGateServiceHandler registers the http handlers for service EventGateService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventGateServiceHandlerClient ¶ added in v0.0.6
func RegisterEventGateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventGateServiceClient) error
RegisterEventGateServiceHandlerClient registers the http handlers for service EventGateService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventGateServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventGateServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventGateServiceClient" to call the correct interceptors.
func RegisterEventGateServiceHandlerFromEndpoint ¶ added in v0.0.6
func RegisterEventGateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventGateServiceHandlerFromEndpoint is same as RegisterEventGateServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventGateServiceHandlerServer ¶ added in v0.0.6
func RegisterEventGateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventGateServiceServer) error
RegisterEventGateServiceHandlerServer registers the http handlers for service EventGateService to "mux". UnaryRPC :call EventGateServiceServer 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 RegisterEventGateServiceHandlerFromEndpoint instead.
func RegisterEventGateServiceServer ¶ added in v0.0.6
func RegisterEventGateServiceServer(s *grpc.Server, srv EventGateServiceServer)
Types ¶
type CloudEvent ¶
type CloudEvent struct { // Identifies the event. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The version of the CloudEvents specification which the event uses. Specversion string `protobuf:"bytes,2,opt,name=specversion,proto3" json:"specversion,omitempty"` // Identifies the context in which an event happened. Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` // Describes the type of event related to the originating occurrence. Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // Describes the subject of the event in the context of the event producer (identified by source). Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // Identifies the schema that data adheres to. Dataschema string `protobuf:"bytes,6,opt,name=dataschema,proto3" json:"dataschema,omitempty"` // Content type of the data value. Must adhere to RFC 2046 format. Datacontenttype string `protobuf:"bytes,7,opt,name=datacontenttype,proto3" json:"datacontenttype,omitempty"` // The event payload(structured). Data *_struct.Struct `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` // Base64 encoded event payload. Must adhere to RFC4648. DataBase64 string `protobuf:"bytes,9,opt,name=data_base64,json=dataBase64,proto3" json:"data_base64,omitempty"` // Timestamp of when the occurrence happened. Must adhere to RFC 3339. Time *timestamp.Timestamp `protobuf:"bytes,20,opt,name=time,proto3" json:"time,omitempty"` // Base64 encoded authentication payload(jwt.claims). EventgateAuth string `protobuf:"bytes,21,opt,name=eventgate_auth,json=eventgateAuth,proto3" json:"eventgate_auth,omitempty"` // contains filtered or unexported fields }
CloudEvent is
func (*CloudEvent) Descriptor
deprecated
func (*CloudEvent) Descriptor() ([]byte, []int)
Deprecated: Use CloudEvent.ProtoReflect.Descriptor instead.
func (*CloudEvent) GetData ¶
func (x *CloudEvent) GetData() *_struct.Struct
func (*CloudEvent) GetDataBase64 ¶ added in v0.0.6
func (x *CloudEvent) GetDataBase64() string
func (*CloudEvent) GetDatacontenttype ¶ added in v0.0.6
func (x *CloudEvent) GetDatacontenttype() string
func (*CloudEvent) GetDataschema ¶ added in v0.0.5
func (x *CloudEvent) GetDataschema() string
func (*CloudEvent) GetEventgateAuth ¶ added in v0.0.6
func (x *CloudEvent) GetEventgateAuth() string
func (*CloudEvent) GetId ¶
func (x *CloudEvent) GetId() string
func (*CloudEvent) GetSource ¶
func (x *CloudEvent) GetSource() string
func (*CloudEvent) GetSpecversion ¶
func (x *CloudEvent) GetSpecversion() string
func (*CloudEvent) GetSubject ¶
func (x *CloudEvent) GetSubject() string
func (*CloudEvent) GetTime ¶
func (x *CloudEvent) GetTime() *timestamp.Timestamp
func (*CloudEvent) GetType ¶
func (x *CloudEvent) GetType() string
func (*CloudEvent) ProtoMessage ¶
func (*CloudEvent) ProtoMessage()
func (*CloudEvent) ProtoReflect ¶
func (x *CloudEvent) ProtoReflect() protoreflect.Message
func (*CloudEvent) Reset ¶
func (x *CloudEvent) Reset()
func (*CloudEvent) String ¶
func (x *CloudEvent) String() string
func (*CloudEvent) Validate ¶
func (this *CloudEvent) Validate() error
type CloudEventInput ¶
type CloudEventInput struct { // The version of the CloudEvents specification which the event uses. Specversion string `protobuf:"bytes,2,opt,name=specversion,proto3" json:"specversion,omitempty"` // Identifies the context in which an event happened. Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` // Describes the type of event related to the originating occurrence. Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // Describes the subject of the event in the context of the event producer (identified by source). Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // Identifies the schema that data adheres to. Dataschema string `protobuf:"bytes,6,opt,name=dataschema,proto3" json:"dataschema,omitempty"` // Content type of the data value. Must adhere to RFC 2046 format. Datacontenttype string `protobuf:"bytes,7,opt,name=datacontenttype,proto3" json:"datacontenttype,omitempty"` //The event payload(structured). Data *_struct.Struct `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` // Base64 encoded event payload. Must adhere to RFC4648. DataBase64 string `protobuf:"bytes,9,opt,name=data_base64,json=dataBase64,proto3" json:"data_base64,omitempty"` // contains filtered or unexported fields }
CloudEventInput constructs a cloud event
func (*CloudEventInput) Descriptor
deprecated
func (*CloudEventInput) Descriptor() ([]byte, []int)
Deprecated: Use CloudEventInput.ProtoReflect.Descriptor instead.
func (*CloudEventInput) GetData ¶
func (x *CloudEventInput) GetData() *_struct.Struct
func (*CloudEventInput) GetDataBase64 ¶ added in v0.0.6
func (x *CloudEventInput) GetDataBase64() string
func (*CloudEventInput) GetDatacontenttype ¶ added in v0.0.6
func (x *CloudEventInput) GetDatacontenttype() string
func (*CloudEventInput) GetDataschema ¶ added in v0.0.5
func (x *CloudEventInput) GetDataschema() string
func (*CloudEventInput) GetSource ¶
func (x *CloudEventInput) GetSource() string
func (*CloudEventInput) GetSpecversion ¶
func (x *CloudEventInput) GetSpecversion() string
func (*CloudEventInput) GetSubject ¶
func (x *CloudEventInput) GetSubject() string
func (*CloudEventInput) GetType ¶
func (x *CloudEventInput) GetType() string
func (*CloudEventInput) ProtoMessage ¶
func (*CloudEventInput) ProtoMessage()
func (*CloudEventInput) ProtoReflect ¶
func (x *CloudEventInput) ProtoReflect() protoreflect.Message
func (*CloudEventInput) Reset ¶
func (x *CloudEventInput) Reset()
func (*CloudEventInput) String ¶
func (x *CloudEventInput) String() string
func (*CloudEventInput) Validate ¶
func (this *CloudEventInput) Validate() error
type EventGateServiceClient ¶ added in v0.0.6
type EventGateServiceClient interface { // Brodcast an event(one way) Send(ctx context.Context, in *CloudEventInput, opts ...grpc.CallOption) (*empty.Empty, error) // Request sends an event as a request and waits for an event as a response Request(ctx context.Context, in *CloudEventInput, opts ...grpc.CallOption) (*CloudEvent, error) // Receive streams events to a client that pass a Filter Receive(ctx context.Context, in *Filter, opts ...grpc.CallOption) (EventGateService_ReceiveClient, error) }
EventGateServiceClient is the client API for EventGateService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventGateServiceClient ¶ added in v0.0.6
func NewEventGateServiceClient(cc grpc.ClientConnInterface) EventGateServiceClient
type EventGateServiceServer ¶ added in v0.0.6
type EventGateServiceServer interface { // Brodcast an event(one way) Send(context.Context, *CloudEventInput) (*empty.Empty, error) // Request sends an event as a request and waits for an event as a response Request(context.Context, *CloudEventInput) (*CloudEvent, error) // Receive streams events to a client that pass a Filter Receive(*Filter, EventGateService_ReceiveServer) error }
EventGateServiceServer is the server API for EventGateService service.
type EventGateService_ReceiveClient ¶ added in v0.0.6
type EventGateService_ReceiveClient interface { Recv() (*CloudEvent, error) grpc.ClientStream }
type EventGateService_ReceiveServer ¶ added in v0.0.6
type EventGateService_ReceiveServer interface { Send(*CloudEvent) error grpc.ServerStream }
type Filter ¶ added in v0.0.6
type Filter struct { // The version of the CloudEvents specification which the event uses. Specversion string `protobuf:"bytes,1,opt,name=specversion,proto3" json:"specversion,omitempty"` // Identifies the context in which an event happened. Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // Describes the type of event related to the originating occurrence. Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // Describes the subject of the event in the context of the event producer (identified by source). Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // contains filtered or unexported fields }
Filter filters cloud events
func (*Filter) Descriptor
deprecated
added in
v0.0.6
func (*Filter) GetSpecversion ¶ added in v0.0.6
func (*Filter) GetSubject ¶ added in v0.0.6
func (*Filter) ProtoMessage ¶ added in v0.0.6
func (*Filter) ProtoMessage()
func (*Filter) ProtoReflect ¶ added in v0.0.6
func (x *Filter) ProtoReflect() protoreflect.Message
type UnimplementedEventGateServiceServer ¶ added in v0.0.6
type UnimplementedEventGateServiceServer struct { }
UnimplementedEventGateServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventGateServiceServer) Receive ¶ added in v0.0.6
func (*UnimplementedEventGateServiceServer) Receive(*Filter, EventGateService_ReceiveServer) error
func (*UnimplementedEventGateServiceServer) Request ¶ added in v0.0.6
func (*UnimplementedEventGateServiceServer) Request(context.Context, *CloudEventInput) (*CloudEvent, error)
func (*UnimplementedEventGateServiceServer) Send ¶ added in v0.0.6
func (*UnimplementedEventGateServiceServer) Send(context.Context, *CloudEventInput) (*empty.Empty, error)