rpctest

package
v3.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFooBarServer

func RegisterFooBarServer(s *grpc.Server, srv FooBarServer)

Types

type Bar

type Bar struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Bar) Descriptor

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

func (*Bar) GetMessage

func (m *Bar) GetMessage() string

func (*Bar) ProtoMessage

func (*Bar) ProtoMessage()

func (*Bar) Reset

func (m *Bar) Reset()

func (*Bar) String

func (m *Bar) String() string

func (*Bar) XXX_DiscardUnknown added in v3.16.2

func (m *Bar) XXX_DiscardUnknown()

func (*Bar) XXX_Marshal added in v3.16.2

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

func (*Bar) XXX_Merge added in v3.16.2

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

func (*Bar) XXX_Size added in v3.16.2

func (m *Bar) XXX_Size() int

func (*Bar) XXX_Unmarshal added in v3.16.2

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

type Foo

type Foo struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Foo) Descriptor

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

func (*Foo) GetMessage

func (m *Foo) GetMessage() string

func (*Foo) ProtoMessage

func (*Foo) ProtoMessage()

func (*Foo) Reset

func (m *Foo) Reset()

func (*Foo) String

func (m *Foo) String() string

func (*Foo) XXX_DiscardUnknown added in v3.16.2

func (m *Foo) XXX_DiscardUnknown()

func (*Foo) XXX_Marshal added in v3.16.2

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

func (*Foo) XXX_Merge added in v3.16.2

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

func (*Foo) XXX_Size added in v3.16.2

func (m *Foo) XXX_Size() int

func (*Foo) XXX_Unmarshal added in v3.16.2

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

type FooBarClient

type FooBarClient interface {
	Unary(ctx context.Context, in *Foo, opts ...grpc.CallOption) (*Bar, error)
	ClientStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_ClientStreamClient, error)
	ServerStream(ctx context.Context, in *Foo, opts ...grpc.CallOption) (FooBar_ServerStreamClient, error)
	BidiStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_BidiStreamClient, error)
}

FooBarClient is the client API for FooBar service.

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

func NewFooBarClient

func NewFooBarClient(cc *grpc.ClientConn) FooBarClient

type FooBarExampleServer

type FooBarExampleServer struct{}

The FooBarExampleServer is an example/test server

func (*FooBarExampleServer) BidiStream

func (s *FooBarExampleServer) BidiStream(stream FooBar_BidiStreamServer) error

BidiStream RPC example

func (*FooBarExampleServer) ClientStream

func (s *FooBarExampleServer) ClientStream(stream FooBar_ClientStreamServer) error

ClientStream RPC example

func (*FooBarExampleServer) ServerStream

func (s *FooBarExampleServer) ServerStream(foo *Foo, stream FooBar_ServerStreamServer) error

ServerStream RPC example

func (*FooBarExampleServer) Unary

func (s *FooBarExampleServer) Unary(ctx context.Context, foo *Foo) (*Bar, error)

Unary RPC example

type FooBarServer

type FooBarServer interface {
	Unary(context.Context, *Foo) (*Bar, error)
	ClientStream(FooBar_ClientStreamServer) error
	ServerStream(*Foo, FooBar_ServerStreamServer) error
	BidiStream(FooBar_BidiStreamServer) error
}

FooBarServer is the server API for FooBar service.

type FooBar_BidiStreamClient

type FooBar_BidiStreamClient interface {
	Send(*Foo) error
	Recv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_BidiStreamServer

type FooBar_BidiStreamServer interface {
	Send(*Bar) error
	Recv() (*Foo, error)
	grpc.ServerStream
}

type FooBar_ClientStreamClient

type FooBar_ClientStreamClient interface {
	Send(*Foo) error
	CloseAndRecv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_ClientStreamServer

type FooBar_ClientStreamServer interface {
	SendAndClose(*Bar) error
	Recv() (*Foo, error)
	grpc.ServerStream
}

type FooBar_ServerStreamClient

type FooBar_ServerStreamClient interface {
	Recv() (*Bar, error)
	grpc.ClientStream
}

type FooBar_ServerStreamServer

type FooBar_ServerStreamServer interface {
	Send(*Bar) error
	grpc.ServerStream
}

type UnimplementedFooBarServer added in v3.16.2

type UnimplementedFooBarServer struct {
}

UnimplementedFooBarServer can be embedded to have forward compatible implementations.

func (*UnimplementedFooBarServer) BidiStream added in v3.16.2

func (*UnimplementedFooBarServer) ClientStream added in v3.16.2

func (*UnimplementedFooBarServer) ServerStream added in v3.16.2

func (*UnimplementedFooBarServer) Unary added in v3.16.2

func (*UnimplementedFooBarServer) Unary(ctx context.Context, req *Foo) (*Bar, error)

Jump to

Keyboard shortcuts

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