proto

package
v0.0.0-...-23bf2d9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_client_service_proto_client_proto protoreflect.FileDescriptor

Functions

func NewClientEndpoints

func NewClientEndpoints() []*api.Endpoint

NewClientEndpoints API Endpoints for Client service

func RegisterClientHandler

func RegisterClientHandler(s server.Server, hdlr ClientHandler, opts ...server.HandlerOption) error

Types

type ClientHandler

type ClientHandler interface {
	// Call allows a single request to be made
	Call(context.Context, *Request, *Response) error
	// Stream is a bidirectional stream
	Stream(context.Context, Client_StreamStream) error
	// Publish publishes a message and returns an empty Message
	Publish(context.Context, *Message, *Message) error
}

ClientHandler is the server API for Client service.

type ClientService

type ClientService interface {
	// Call allows a single request to be made
	Call(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	// Stream is a bidirectional stream
	Stream(ctx context.Context, opts ...client.CallOption) (Client_StreamService, error)
	// Publish publishes a message and returns an empty Message
	Publish(ctx context.Context, in *Message, opts ...client.CallOption) (*Message, error)
}

ClientService is the client API for Client service.

func NewClientService

func NewClientService(name string, c client.Client) ClientService

type Client_StreamService

type Client_StreamService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Request) error
	Recv() (*Response, error)
}

type Client_StreamStream

type Client_StreamStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Response) error
	Recv() (*Request, error)
}

type Message

type Message struct {
	Topic       string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Body        []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetBody

func (x *Message) GetBody() []byte

func (*Message) GetContentType

func (x *Message) GetContentType() string

func (*Message) GetTopic

func (x *Message) GetTopic() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Request

type Request struct {
	Service     string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Endpoint    string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Body        []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetBody

func (x *Request) GetBody() []byte

func (*Request) GetContentType

func (x *Request) GetContentType() string

func (*Request) GetEndpoint

func (x *Request) GetEndpoint() string

func (*Request) GetService

func (x *Request) GetService() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetBody

func (x *Response) GetBody() []byte

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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