options

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Tell",
		1: "Ask",
		2: "FutureAsk",
	}
	Type_value = map[string]int32{
		"Tell":      0,
		"Ask":       1,
		"FutureAsk": 2,
	}
)

Enum value maps for Type.

View Source
var (
	// optional options.MethodOptions method_options = 50000;
	E_MethodOptions = &file_options_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var File_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

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 MethodOptions

type MethodOptions struct {
	Type    Type    `protobuf:"varint,1,opt,name=type,proto3,enum=options.Type" json:"type,omitempty"` // 方法类型,默认为 Tell
	Timeout *uint64 `protobuf:"varint,2,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`       // FutureAsk 的毫秒级超时时间(默认 1000ms )
	// contains filtered or unexported fields
}

func (*MethodOptions) Descriptor deprecated

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

Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead.

func (*MethodOptions) GetTimeout

func (x *MethodOptions) GetTimeout() uint64

func (*MethodOptions) GetType

func (x *MethodOptions) GetType() Type

func (*MethodOptions) ProtoMessage

func (*MethodOptions) ProtoMessage()

func (*MethodOptions) ProtoReflect

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

func (*MethodOptions) Reset

func (x *MethodOptions) Reset()

func (*MethodOptions) String

func (x *MethodOptions) String() string

type Type

type Type int32
const (
	Type_Tell      Type = 0 // Tell 模式下返回值将会被忽略
	Type_Ask       Type = 1 // Ask 模式
	Type_FutureAsk Type = 2 // FutureAsk 模式
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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