mirror

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 14 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMirror = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMirror   = fmt.Errorf("proto: integer overflow")
)

Functions

func BuildMirrorYARPCProcedures

func BuildMirrorYARPCProcedures(server MirrorYARPCServer) []transport.Procedure

BuildMirrorYARPCProcedures prepares an implementation of the Mirror service for YARPC registration.

func NewFxMirrorYARPCClient

func NewFxMirrorYARPCClient(name string, options ...protobuf.ClientOption) interface{}

NewFxMirrorYARPCClient provides a MirrorYARPCClient to an Fx application using the given name for routing.

fx.Provide(
  mirror.NewFxMirrorYARPCClient("service-name"),
  ...
)

func NewFxMirrorYARPCProcedures

func NewFxMirrorYARPCProcedures() interface{}

NewFxMirrorYARPCProcedures provides MirrorYARPCServer procedures to an Fx application. It expects a MirrorYARPCServer to be present in the container.

fx.Provide(
  mirror.NewFxMirrorYARPCProcedures(),
  ...
)

Types

type FxMirrorYARPCClientParams

type FxMirrorYARPCClientParams struct {
	fx.In

	Provider    yarpc.ClientConfig
	AnyResolver jsonpb.AnyResolver `name:"yarpcfx" optional:"true"`
}

FxMirrorYARPCClientParams defines the input for NewFxMirrorYARPCClient. It provides the paramaters to get a MirrorYARPCClient in an Fx application.

type FxMirrorYARPCClientResult

type FxMirrorYARPCClientResult struct {
	fx.Out

	Client MirrorYARPCClient
}

FxMirrorYARPCClientResult defines the output of NewFxMirrorYARPCClient. It provides a MirrorYARPCClient to an Fx application.

type FxMirrorYARPCProceduresParams

type FxMirrorYARPCProceduresParams struct {
	fx.In

	Server      MirrorYARPCServer
	AnyResolver jsonpb.AnyResolver `name:"yarpcfx" optional:"true"`
}

FxMirrorYARPCProceduresParams defines the input for NewFxMirrorYARPCProcedures. It provides the paramaters to get MirrorYARPCServer procedures in an Fx application.

type FxMirrorYARPCProceduresResult

type FxMirrorYARPCProceduresResult struct {
	fx.Out

	Procedures     []transport.Procedure `group:"yarpcfx"`
	ReflectionMeta reflection.ServerMeta `group:"yarpcfx"`
}

FxMirrorYARPCProceduresResult defines the output of NewFxMirrorYARPCProcedures. It provides MirrorYARPCServer procedures to an Fx application.

The procedures are provided to the "yarpcfx" value group. Dig 1.2 or newer must be used for this feature to work.

type MirrorYARPCClient

type MirrorYARPCClient interface {
	Mirror(context.Context, *Request, ...yarpc.CallOption) (*Response, error)
}

MirrorYARPCClient is the YARPC client-side interface for the Mirror service.

func NewMirrorYARPCClient

func NewMirrorYARPCClient(clientConfig transport.ClientConfig, options ...protobuf.ClientOption) MirrorYARPCClient

NewMirrorYARPCClient builds a new YARPC client for the Mirror service.

type MirrorYARPCServer

type MirrorYARPCServer interface {
	Mirror(context.Context, *Request) (*Response, error)
}

MirrorYARPCServer is the YARPC server-side interface for the Mirror service.

type Request

type Request struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

func (*Request) Descriptor

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

func (*Request) Equal

func (this *Request) Equal(that interface{}) bool

func (*Request) GetMessage

func (m *Request) GetMessage() string

func (*Request) GoString

func (this *Request) GoString() string

func (*Request) Marshal

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

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

func (*Request) String

func (this *Request) String() string

func (*Request) Unmarshal

func (m *Request) Unmarshal(dAtA []byte) error

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

func (*Response) Descriptor

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

func (*Response) Equal

func (this *Response) Equal(that interface{}) bool

func (*Response) GetMessage

func (m *Response) GetMessage() string

func (*Response) GoString

func (this *Response) GoString() string

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

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

func (*Response) String

func (this *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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