testservice

package
v1.16.109 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_simple_proto protoreflect.FileDescriptor
View Source
var Simple_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testservice.Simple",
	HandlerType: (*SimpleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Something",
			Handler:    _Simple_Something_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Flow",
			Handler:       _Simple_Flow_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "simple.proto",
}

Simple_ServiceDesc is the grpc.ServiceDesc for Simple service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSimpleServer

func RegisterSimpleServer(s grpc.ServiceRegistrar, srv SimpleServer)

Types

type Req

type Req struct {
	Datacenter string `protobuf:"bytes,1,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
	// contains filtered or unexported fields
}

func (*Req) Descriptor deprecated

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

Deprecated: Use Req.ProtoReflect.Descriptor instead.

func (*Req) GetDatacenter

func (x *Req) GetDatacenter() string

func (*Req) MarshalBinary

func (msg *Req) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) ProtoReflect

func (x *Req) ProtoReflect() protoreflect.Message

func (*Req) Reset

func (x *Req) Reset()

func (*Req) String

func (x *Req) String() string

func (*Req) UnmarshalBinary

func (msg *Req) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Resp

type Resp struct {
	ServerName string `protobuf:"bytes,1,opt,name=ServerName,proto3" json:"ServerName,omitempty"`
	Datacenter string `protobuf:"bytes,2,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
	// contains filtered or unexported fields
}

func (*Resp) Descriptor deprecated

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

Deprecated: Use Resp.ProtoReflect.Descriptor instead.

func (*Resp) GetDatacenter

func (x *Resp) GetDatacenter() string

func (*Resp) GetServerName

func (x *Resp) GetServerName() string

func (*Resp) MarshalBinary

func (msg *Resp) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) ProtoReflect

func (x *Resp) ProtoReflect() protoreflect.Message

func (*Resp) Reset

func (x *Resp) Reset()

func (*Resp) String

func (x *Resp) String() string

func (*Resp) UnmarshalBinary

func (msg *Resp) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Simple

type Simple struct {
	Name string
	DC   string
}

func (*Simple) Flow

func (s *Simple) Flow(_ *Req, flow Simple_FlowServer) error

func (*Simple) Something

func (s *Simple) Something(_ context.Context, _ *Req) (*Resp, error)

type SimpleClient

type SimpleClient interface {
	Something(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
	Flow(ctx context.Context, in *Req, opts ...grpc.CallOption) (Simple_FlowClient, error)
}

SimpleClient is the client API for Simple service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSimpleClient

func NewSimpleClient(cc grpc.ClientConnInterface) SimpleClient

type SimplePanic

type SimplePanic struct {
	Name, DC string
}

func (*SimplePanic) Flow

func (s *SimplePanic) Flow(_ *Req, flow Simple_FlowServer) error

func (*SimplePanic) Something

func (s *SimplePanic) Something(_ context.Context, _ *Req) (*Resp, error)

type SimpleServer

type SimpleServer interface {
	Something(context.Context, *Req) (*Resp, error)
	Flow(*Req, Simple_FlowServer) error
}

SimpleServer is the server API for Simple service. All implementations should embed UnimplementedSimpleServer for forward compatibility

type Simple_FlowClient

type Simple_FlowClient interface {
	Recv() (*Resp, error)
	grpc.ClientStream
}

type Simple_FlowServer

type Simple_FlowServer interface {
	Send(*Resp) error
	grpc.ServerStream
}

type UnimplementedSimpleServer

type UnimplementedSimpleServer struct {
}

UnimplementedSimpleServer should be embedded to have forward compatible implementations.

func (UnimplementedSimpleServer) Flow

func (UnimplementedSimpleServer) Something

type UnsafeSimpleServer

type UnsafeSimpleServer interface {
	// contains filtered or unexported methods
}

UnsafeSimpleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SimpleServer will result in compilation errors.

Jump to

Keyboard shortcuts

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