Documentation ¶
Index ¶
- type BidiStream
- type CallOption
- type ClientConn
- func (c *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, ...) error
- func (c *ClientConn) NewBidiStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (BidiStream, error)
- func (c *ClientConn) NewClientStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (ClientStream, error)
- func (c *ClientConn) NewServerStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (ServerStream, error)
- type ClientStream
- type DialOption
- type ServerStream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BidiStream ¶ added in v0.2.5
type BidiStream interface { // Header returns the header metadata from the server, if there is any. // It blocks if the metadata is not ready to read. Header() (metadata.MD, error) // Trailer returns the trailer metadata from the server, if there is any. // It must only be called after stream.CloseAndReceive has returned, or // stream.Receive has returned a non-nil error (including io.EOF). Trailer() metadata.MD Send(ctx context.Context, req interface{}) error Receive(ctx context.Context, res interface{}) error CloseSend() error }
type CallOption ¶ added in v0.2.5
type CallOption func(*callOptions)
func CallContentSubtype ¶ added in v0.2.5
func CallContentSubtype(contentSubtype string) CallOption
func Header ¶ added in v0.2.5
func Header(h *metadata.MD) CallOption
func Trailer ¶ added in v0.2.5
func Trailer(t *metadata.MD) CallOption
type ClientConn ¶ added in v0.2.5
type ClientConn struct {
// contains filtered or unexported fields
}
func DialContext ¶ added in v0.2.5
func DialContext(host string, opts ...DialOption) (*ClientConn, error)
func (*ClientConn) Invoke ¶ added in v0.2.5
func (c *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...CallOption) error
func (*ClientConn) NewBidiStream ¶ added in v0.2.5
func (c *ClientConn) NewBidiStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (BidiStream, error)
func (*ClientConn) NewClientStream ¶ added in v0.2.5
func (c *ClientConn) NewClientStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (ClientStream, error)
func (*ClientConn) NewServerStream ¶ added in v0.2.5
func (c *ClientConn) NewServerStream(desc *grpc.StreamDesc, method string, opts ...CallOption) (ServerStream, error)
type ClientStream ¶ added in v0.2.5
type ClientStream interface { // Header returns the header metadata from the server, if there is any. // It blocks if the metadata is not ready to read. Header() (metadata.MD, error) // Trailer returns the trailer metadata from the server, if there is any. // It must only be called after stream.CloseAndReceive has returned, or // stream.Receive has returned a non-nil error (including io.EOF). Trailer() metadata.MD Send(ctx context.Context, req interface{}) error CloseAndReceive(ctx context.Context, res interface{}) error }
type DialOption ¶ added in v0.2.5
type DialOption func(*dialOptions)
func WithDefaultCallOptions ¶ added in v0.2.5
func WithDefaultCallOptions(opts ...CallOption) DialOption
func WithInsecure ¶ added in v0.2.5
func WithInsecure() DialOption
func WithTransportCredentials ¶ added in v0.2.5
func WithTransportCredentials(creds credentials.TransportCredentials) DialOption
type ServerStream ¶ added in v0.2.5
type ServerStream interface { // Header returns the header metadata from the server, if there is any. // It blocks if the metadata is not ready to read. Header() (metadata.MD, error) // Trailer returns the trailer metadata from the server, if there is any. // It must only be called after stream.CloseAndReceive has returned, or // stream.Receive has returned a non-nil error (including io.EOF). Trailer() metadata.MD Send(ctx context.Context, req interface{}) error Receive(ctx context.Context, res interface{}) error }
Click to show internal directories.
Click to hide internal directories.