streaming

package
v1.32.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func BuildHelloYARPCProcedures

func BuildHelloYARPCProcedures(server HelloYARPCServer) []transport.Procedure

BuildHelloYARPCProcedures prepares an implementation of the Hello service for YARPC registration.

func NewFxHelloYARPCClient added in v1.29.0

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

NewFxHelloYARPCClient provides a HelloYARPCClient to an Fx application using the given name for routing.

fx.Provide(
  streaming.NewFxHelloYARPCClient("service-name"),
  ...
)

func NewFxHelloYARPCProcedures added in v1.29.0

func NewFxHelloYARPCProcedures() interface{}

NewFxHelloYARPCProcedures provides HelloYARPCServer procedures to an Fx application. It expects a HelloYARPCServer to be present in the container.

fx.Provide(
  streaming.NewFxHelloYARPCProcedures(),
  ...
)

func RegisterHelloServer

func RegisterHelloServer(s *grpc.Server, srv HelloServer)

Types

type FxHelloYARPCClientParams added in v1.29.0

type FxHelloYARPCClientParams struct {
	fx.In

	Provider yarpc.ClientConfig
}

FxHelloYARPCClientParams defines the input for NewFxHelloYARPCClient. It provides the paramaters to get a HelloYARPCClient in an Fx application.

type FxHelloYARPCClientResult added in v1.29.0

type FxHelloYARPCClientResult struct {
	fx.Out

	Client HelloYARPCClient
}

FxHelloYARPCClientResult defines the output of NewFxHelloYARPCClient. It provides a HelloYARPCClient to an Fx application.

type FxHelloYARPCProceduresParams added in v1.29.0

type FxHelloYARPCProceduresParams struct {
	fx.In

	Server HelloYARPCServer
}

FxHelloYARPCProceduresParams defines the input for NewFxHelloYARPCProcedures. It provides the paramaters to get HelloYARPCServer procedures in an Fx application.

type FxHelloYARPCProceduresResult added in v1.29.0

type FxHelloYARPCProceduresResult struct {
	fx.Out

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

FxHelloYARPCProceduresResult defines the output of NewFxHelloYARPCProcedures. It provides HelloYARPCServer 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 HelloClient

type HelloClient interface {
	HelloUnary(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
	HelloThere(ctx context.Context, opts ...grpc.CallOption) (Hello_HelloThereClient, error)
	HelloOutStream(ctx context.Context, opts ...grpc.CallOption) (Hello_HelloOutStreamClient, error)
	HelloInStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Hello_HelloInStreamClient, error)
}

func NewHelloClient

func NewHelloClient(cc *grpc.ClientConn) HelloClient

type HelloRequest

type HelloRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HelloRequest) Descriptor

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

func (*HelloRequest) Equal

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

func (*HelloRequest) GetId

func (m *HelloRequest) GetId() string

func (*HelloRequest) GoString

func (this *HelloRequest) GoString() string

func (*HelloRequest) Marshal

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

func (*HelloRequest) MarshalTo

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

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) Size

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

func (*HelloRequest) String

func (this *HelloRequest) String() string

func (*HelloRequest) Unmarshal

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

func (*HelloRequest) XXX_DiscardUnknown added in v1.32.0

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal added in v1.32.0

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

func (*HelloRequest) XXX_Merge added in v1.32.0

func (dst *HelloRequest) XXX_Merge(src proto.Message)

func (*HelloRequest) XXX_Size added in v1.32.0

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal added in v1.32.0

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

type HelloResponse

type HelloResponse struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HelloResponse) Descriptor

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

func (*HelloResponse) Equal

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

func (*HelloResponse) GetId

func (m *HelloResponse) GetId() string

func (*HelloResponse) GoString

func (this *HelloResponse) GoString() string

func (*HelloResponse) Marshal

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

func (*HelloResponse) MarshalTo

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

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) Reset

func (m *HelloResponse) Reset()

func (*HelloResponse) Size

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

func (*HelloResponse) String

func (this *HelloResponse) String() string

func (*HelloResponse) Unmarshal

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

func (*HelloResponse) XXX_DiscardUnknown added in v1.32.0

func (m *HelloResponse) XXX_DiscardUnknown()

func (*HelloResponse) XXX_Marshal added in v1.32.0

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

func (*HelloResponse) XXX_Merge added in v1.32.0

func (dst *HelloResponse) XXX_Merge(src proto.Message)

func (*HelloResponse) XXX_Size added in v1.32.0

func (m *HelloResponse) XXX_Size() int

func (*HelloResponse) XXX_Unmarshal added in v1.32.0

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

type HelloServer

type HelloServer interface {
	HelloUnary(context.Context, *HelloRequest) (*HelloResponse, error)
	HelloThere(Hello_HelloThereServer) error
	HelloOutStream(Hello_HelloOutStreamServer) error
	HelloInStream(*HelloRequest, Hello_HelloInStreamServer) error
}

type HelloServiceHelloInStreamYARPCClient

type HelloServiceHelloInStreamYARPCClient interface {
	Context() context.Context
	Recv(...yarpc.StreamOption) (*HelloResponse, error)
	CloseSend(...yarpc.StreamOption) error
}

HelloServiceHelloInStreamYARPCClient receives HelloResponses, returning io.EOF when the stream is complete.

type HelloServiceHelloInStreamYARPCServer

type HelloServiceHelloInStreamYARPCServer interface {
	Context() context.Context
	Send(*HelloResponse, ...yarpc.StreamOption) error
}

HelloServiceHelloInStreamYARPCServer sends HelloResponses.

type HelloServiceHelloOutStreamYARPCClient

type HelloServiceHelloOutStreamYARPCClient interface {
	Context() context.Context
	Send(*HelloRequest, ...yarpc.StreamOption) error
	CloseAndRecv(...yarpc.StreamOption) (*HelloResponse, error)
}

HelloServiceHelloOutStreamYARPCClient sends HelloRequests and receives the single HelloResponse when sending is done.

type HelloServiceHelloOutStreamYARPCServer

type HelloServiceHelloOutStreamYARPCServer interface {
	Context() context.Context
	Recv(...yarpc.StreamOption) (*HelloRequest, error)
}

HelloServiceHelloOutStreamYARPCServer receives HelloRequests.

type HelloServiceHelloThereYARPCClient

type HelloServiceHelloThereYARPCClient interface {
	Context() context.Context
	Send(*HelloRequest, ...yarpc.StreamOption) error
	Recv(...yarpc.StreamOption) (*HelloResponse, error)
	CloseSend(...yarpc.StreamOption) error
}

HelloServiceHelloThereYARPCClient sends HelloRequests and receives HelloResponses, returning io.EOF when the stream is complete.

type HelloServiceHelloThereYARPCServer

type HelloServiceHelloThereYARPCServer interface {
	Context() context.Context
	Recv(...yarpc.StreamOption) (*HelloRequest, error)
	Send(*HelloResponse, ...yarpc.StreamOption) error
}

HelloServiceHelloThereYARPCServer receives HelloRequests and sends HelloResponse.

type HelloYARPCClient

HelloYARPCClient is the YARPC client-side interface for the Hello service.

func NewHelloYARPCClient

func NewHelloYARPCClient(clientConfig transport.ClientConfig, options ...protobuf.ClientOption) HelloYARPCClient

NewHelloYARPCClient builds a new YARPC client for the Hello service.

type HelloYARPCServer

HelloYARPCServer is the YARPC server-side interface for the Hello service.

type Hello_HelloInStreamClient

type Hello_HelloInStreamClient interface {
	Recv() (*HelloResponse, error)
	grpc.ClientStream
}

type Hello_HelloInStreamServer

type Hello_HelloInStreamServer interface {
	Send(*HelloResponse) error
	grpc.ServerStream
}

type Hello_HelloOutStreamClient

type Hello_HelloOutStreamClient interface {
	Send(*HelloRequest) error
	CloseAndRecv() (*HelloResponse, error)
	grpc.ClientStream
}

type Hello_HelloOutStreamServer

type Hello_HelloOutStreamServer interface {
	SendAndClose(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type Hello_HelloThereClient

type Hello_HelloThereClient interface {
	Send(*HelloRequest) error
	Recv() (*HelloResponse, error)
	grpc.ClientStream
}

type Hello_HelloThereServer

type Hello_HelloThereServer interface {
	Send(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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