eventgate

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package eventgate is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_schema_proto protoreflect.FileDescriptor

Functions

func RegisterCloudEventsServiceHandler

func RegisterCloudEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCloudEventsServiceHandler registers the http handlers for service CloudEventsService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCloudEventsServiceHandlerClient

func RegisterCloudEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CloudEventsServiceClient) error

RegisterCloudEventsServiceHandlerClient registers the http handlers for service CloudEventsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CloudEventsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CloudEventsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CloudEventsServiceClient" to call the correct interceptors.

func RegisterCloudEventsServiceHandlerFromEndpoint

func RegisterCloudEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCloudEventsServiceHandlerFromEndpoint is same as RegisterCloudEventsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCloudEventsServiceHandlerServer

func RegisterCloudEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CloudEventsServiceServer) error

RegisterCloudEventsServiceHandlerServer registers the http handlers for service CloudEventsService to "mux". UnaryRPC :call CloudEventsServiceServer 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 RegisterCloudEventsServiceHandlerFromEndpoint instead.

func RegisterCloudEventsServiceServer

func RegisterCloudEventsServiceServer(s *grpc.Server, srv CloudEventsServiceServer)

Types

type CloudEvent

type CloudEvent struct {
	Specversion string               `protobuf:"bytes,1,opt,name=specversion,proto3" json:"specversion,omitempty"`
	Id          string               `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Source      string               `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	Type        string               `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	Subject     string               `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
	Attributes  *_struct.Struct      `protobuf:"bytes,6,opt,name=attributes,proto3" json:"attributes,omitempty"`
	Data        *_struct.Struct      `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	Time        *timestamp.Timestamp `protobuf:"bytes,8,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*CloudEvent) Descriptor deprecated

func (*CloudEvent) Descriptor() ([]byte, []int)

Deprecated: Use CloudEvent.ProtoReflect.Descriptor instead.

func (*CloudEvent) GetAttributes

func (x *CloudEvent) GetAttributes() *_struct.Struct

func (*CloudEvent) GetData

func (x *CloudEvent) GetData() *_struct.Struct

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 {
	Specversion string          `protobuf:"bytes,1,opt,name=specversion,proto3" json:"specversion,omitempty"`
	Source      string          `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	Type        string          `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Subject     string          `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
	Attributes  *_struct.Struct `protobuf:"bytes,5,opt,name=attributes,proto3" json:"attributes,omitempty"`
	Data        *_struct.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*CloudEventInput) Descriptor deprecated

func (*CloudEventInput) Descriptor() ([]byte, []int)

Deprecated: Use CloudEventInput.ProtoReflect.Descriptor instead.

func (*CloudEventInput) GetAttributes

func (x *CloudEventInput) GetAttributes() *_struct.Struct

func (*CloudEventInput) GetData

func (x *CloudEventInput) GetData() *_struct.Struct

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 CloudEventsServiceClient

type CloudEventsServiceClient interface {
	Send(ctx context.Context, in *CloudEventInput, opts ...grpc.CallOption) (*empty.Empty, error)
	Request(ctx context.Context, in *CloudEventInput, opts ...grpc.CallOption) (*CloudEvent, error)
	Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (CloudEventsService_ReceiveClient, error)
}

CloudEventsServiceClient is the client API for CloudEventsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type CloudEventsServiceServer

type CloudEventsServiceServer interface {
	Send(context.Context, *CloudEventInput) (*empty.Empty, error)
	Request(context.Context, *CloudEventInput) (*CloudEvent, error)
	Receive(*ReceiveRequest, CloudEventsService_ReceiveServer) error
}

CloudEventsServiceServer is the server API for CloudEventsService service.

type CloudEventsService_ReceiveClient

type CloudEventsService_ReceiveClient interface {
	Recv() (*CloudEvent, error)
	grpc.ClientStream
}

type CloudEventsService_ReceiveServer

type CloudEventsService_ReceiveServer interface {
	Send(*CloudEvent) error
	grpc.ServerStream
}

type ReceiveRequest

type ReceiveRequest struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiveRequest) Descriptor deprecated

func (*ReceiveRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.

func (*ReceiveRequest) GetSubject

func (x *ReceiveRequest) GetSubject() string

func (*ReceiveRequest) GetType

func (x *ReceiveRequest) GetType() string

func (*ReceiveRequest) ProtoMessage

func (*ReceiveRequest) ProtoMessage()

func (*ReceiveRequest) ProtoReflect

func (x *ReceiveRequest) ProtoReflect() protoreflect.Message

func (*ReceiveRequest) Reset

func (x *ReceiveRequest) Reset()

func (*ReceiveRequest) String

func (x *ReceiveRequest) String() string

func (*ReceiveRequest) Validate

func (this *ReceiveRequest) Validate() error

type UnimplementedCloudEventsServiceServer

type UnimplementedCloudEventsServiceServer struct {
}

UnimplementedCloudEventsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCloudEventsServiceServer) Receive

func (*UnimplementedCloudEventsServiceServer) Request

func (*UnimplementedCloudEventsServiceServer) Send

Jump to

Keyboard shortcuts

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