examples

package
v0.61.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGreeterServer added in v0.51.0

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type GreeterClient added in v0.51.0

type GreeterClient interface {
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	SayHelloStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Greeter_SayHelloStreamClient, error)
}

GreeterClient is the client API for Greeter service.

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

func NewGreeterClient added in v0.51.0

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer added in v0.51.0

type GreeterServer interface {
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	SayHelloStream(*HelloRequest, Greeter_SayHelloStreamServer) error
}

GreeterServer is the server API for Greeter service.

type Greeter_SayHelloStreamClient added in v0.51.0

type Greeter_SayHelloStreamClient interface {
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type Greeter_SayHelloStreamServer added in v0.51.0

type Greeter_SayHelloStreamServer interface {
	Send(*HelloReply) error
	grpc.ServerStream
}

type HelloReply added in v0.51.0

type HelloReply 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:"-"`
}

The response message containing the greetings

func (*HelloReply) Descriptor added in v0.51.0

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

func (*HelloReply) GetMessage added in v0.51.0

func (m *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage added in v0.51.0

func (*HelloReply) ProtoMessage()

func (*HelloReply) Reset added in v0.51.0

func (m *HelloReply) Reset()

func (*HelloReply) String added in v0.51.0

func (m *HelloReply) String() string

func (*HelloReply) XXX_DiscardUnknown added in v0.51.0

func (m *HelloReply) XXX_DiscardUnknown()

func (*HelloReply) XXX_Marshal added in v0.51.0

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

func (*HelloReply) XXX_Merge added in v0.51.0

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

func (*HelloReply) XXX_Size added in v0.51.0

func (m *HelloReply) XXX_Size() int

func (*HelloReply) XXX_Unmarshal added in v0.51.0

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

type HelloRequest added in v0.51.0

type HelloRequest struct {
	Firstname            string   `protobuf:"bytes,1,opt,name=firstname,proto3" json:"firstname,omitempty"`
	Lastname             string   `protobuf:"bytes,2,opt,name=lastname,proto3" json:"lastname,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message containing the user's name.

func (*HelloRequest) Descriptor added in v0.51.0

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

func (*HelloRequest) GetFirstname added in v0.51.0

func (m *HelloRequest) GetFirstname() string

func (*HelloRequest) GetLastname added in v0.51.0

func (m *HelloRequest) GetLastname() string

func (*HelloRequest) ProtoMessage added in v0.51.0

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset added in v0.51.0

func (m *HelloRequest) Reset()

func (*HelloRequest) String added in v0.51.0

func (m *HelloRequest) String() string

func (*HelloRequest) XXX_DiscardUnknown added in v0.51.0

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal added in v0.51.0

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

func (*HelloRequest) XXX_Merge added in v0.51.0

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

func (*HelloRequest) XXX_Size added in v0.51.0

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal added in v0.51.0

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

type UnimplementedGreeterServer added in v0.51.0

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) SayHello added in v0.51.0

func (*UnimplementedGreeterServer) SayHelloStream added in v0.51.0

type User added in v0.23.0

type User struct {
	Firstname            *string  `protobuf:"bytes,1,req,name=Firstname" json:"Firstname,omitempty"`
	Lastname             *string  `protobuf:"bytes,2,opt,name=Lastname" json:"Lastname,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User) Descriptor added in v0.23.0

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

func (*User) GetFirstname added in v0.23.0

func (m *User) GetFirstname() string

func (*User) GetLastname added in v0.23.0

func (m *User) GetLastname() string

func (*User) ProtoMessage added in v0.23.0

func (*User) ProtoMessage()

func (*User) Reset added in v0.23.0

func (m *User) Reset()

func (*User) String added in v0.23.0

func (m *User) String() string

func (*User) XXX_DiscardUnknown added in v0.23.0

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal added in v0.23.0

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

func (*User) XXX_Merge added in v0.23.0

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

func (*User) XXX_Size added in v0.23.0

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal added in v0.23.0

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

Jump to

Keyboard shortcuts

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