generator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Generator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dtalk.generator.Generator",
	HandlerType: (*GeneratorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetID",
			Handler:    _Generator_GetID_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

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

Functions

func RegisterGeneratorServer

func RegisterGeneratorServer(s grpc.ServiceRegistrar, srv GeneratorServer)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(etcdAddr, schema, srvName string, dial time.Duration) *Client

func (*Client) GetID

func (c *Client) GetID() (int64, error)

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GeneratorClient

type GeneratorClient interface {
	GetID(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetIDReply, error)
}

GeneratorClient is the client API for Generator service.

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

func NewGeneratorClient

func NewGeneratorClient(cc grpc.ClientConnInterface) GeneratorClient

type GeneratorServer

type GeneratorServer interface {
	GetID(context.Context, *Empty) (*GetIDReply, error)
	// contains filtered or unexported methods
}

GeneratorServer is the server API for Generator service. All implementations must embed UnimplementedGeneratorServer for forward compatibility

type GetIDReply

type GetIDReply struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetIDReply) Descriptor deprecated

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

Deprecated: Use GetIDReply.ProtoReflect.Descriptor instead.

func (*GetIDReply) GetId

func (x *GetIDReply) GetId() int64

func (*GetIDReply) ProtoMessage

func (*GetIDReply) ProtoMessage()

func (*GetIDReply) ProtoReflect

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

func (*GetIDReply) Reset

func (x *GetIDReply) Reset()

func (*GetIDReply) String

func (x *GetIDReply) String() string

type UnimplementedGeneratorServer

type UnimplementedGeneratorServer struct {
}

UnimplementedGeneratorServer must be embedded to have forward compatible implementations.

func (UnimplementedGeneratorServer) GetID

type UnsafeGeneratorServer

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

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

Jump to

Keyboard shortcuts

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