Documentation ¶
Index ¶
- Constants
- Variables
- func CreateMessageBy(msgId uint32) proto.Message
- func GetMessageIDOf(msg proto.Message) uint32
- func RegisterV1()
- func RegisterV2(exName string)
- type Environ
- func (*Environ) Descriptor() ([]byte, []int)
- func (m *Environ) GetAppAccessKey() string
- func (m *Environ) GetAppChannelId() string
- func (m *Environ) GetAppEnv() string
- func (m *Environ) GetAppGameId() string
- func (m *Environ) GetAppLogLevel() string
- func (m *Environ) GetAppPprofAddr() string
- func (m *Environ) GetAppServerId() string
- func (m *Environ) GetAppServerName() string
- func (m *Environ) GetAppWorkingDir() string
- func (m *Environ) GetEtcdAddr() string
- func (m *Environ) GetEtcdKeyspace() string
- func (m *Environ) GetEtcdLeaseTtl() int32
- func (m *Environ) GetNetInterfaces() []*InterfaceAddr
- func (m *Environ) GetServiceDependency() string
- func (m *Environ) GetServiceIndex() int32
- func (m *Environ) GetServiceType() string
- func (m *Environ) Marshal() (dAtA []byte, err error)
- func (m *Environ) MarshalTo(dAtA []byte) (int, error)
- func (m *Environ) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Environ) ProtoMessage()
- func (m *Environ) Reset()
- func (m *Environ) Size() (n int)
- func (m *Environ) String() string
- func (m *Environ) Unmarshal(dAtA []byte) error
- func (m *Environ) XXX_DiscardUnknown()
- func (m *Environ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Environ) XXX_Merge(src proto.Message)
- func (m *Environ) XXX_Size() int
- func (m *Environ) XXX_Unmarshal(b []byte) error
- type InterfaceAddr
- func (*InterfaceAddr) Descriptor() ([]byte, []int)
- func (m *InterfaceAddr) GetAdvertiseAddr() string
- func (m *InterfaceAddr) GetBindAddr() string
- func (m *InterfaceAddr) GetPort() int32
- func (m *InterfaceAddr) Marshal() (dAtA []byte, err error)
- func (m *InterfaceAddr) MarshalTo(dAtA []byte) (int, error)
- func (m *InterfaceAddr) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InterfaceAddr) ProtoMessage()
- func (m *InterfaceAddr) Reset()
- func (m *InterfaceAddr) Size() (n int)
- func (m *InterfaceAddr) String() string
- func (m *InterfaceAddr) Unmarshal(dAtA []byte) error
- func (m *InterfaceAddr) XXX_DiscardUnknown()
- func (m *InterfaceAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InterfaceAddr) XXX_Merge(src proto.Message)
- func (m *InterfaceAddr) XXX_Size() int
- func (m *InterfaceAddr) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( ErrBadRequest = 101 // 错误的请求 ErrInvalidArgument = 102 // 参数错误 ErrOperationNotSupported = 103 // 不支持当前操作 ErrOperationTooOften = 104 // 操作过于频繁 ErrRequestTimeout = 105 // 请求超时 ErrDataCodecFailure = 106 // 数据编码错误 ErrProtocolIncompatible = 107 // 协议不兼容 ErrRpcTimeout = 108 // RPC超时 )
错误码,定义与errno.proto一致
Variables ¶
Functions ¶
func RegisterV1 ¶
func RegisterV1()
func RegisterV2 ¶
func RegisterV2(exName string)
Types ¶
type Environ ¶
type Environ struct { AppEnv string `protobuf:"bytes,1,opt,name=app_env,json=appEnv,proto3" json:"app_env,omitempty"` AppGameId string `protobuf:"bytes,2,opt,name=app_game_id,json=appGameId,proto3" json:"app_game_id,omitempty"` AppChannelId string `protobuf:"bytes,3,opt,name=app_channel_id,json=appChannelId,proto3" json:"app_channel_id,omitempty"` AppServerId string `protobuf:"bytes,4,opt,name=app_server_id,json=appServerId,proto3" json:"app_server_id,omitempty"` AppServerName string `protobuf:"bytes,5,opt,name=app_server_name,json=appServerName,proto3" json:"app_server_name,omitempty"` AppAccessKey string `protobuf:"bytes,6,opt,name=app_access_key,json=appAccessKey,proto3" json:"app_access_key,omitempty"` AppLogLevel string `protobuf:"bytes,7,opt,name=app_log_level,json=appLogLevel,proto3" json:"app_log_level,omitempty"` AppPprofAddr string `protobuf:"bytes,10,opt,name=app_pprof_addr,json=appPprofAddr,proto3" json:"app_pprof_addr,omitempty"` AppWorkingDir string `protobuf:"bytes,11,opt,name=app_working_dir,json=appWorkingDir,proto3" json:"app_working_dir,omitempty"` ServiceType string `protobuf:"bytes,12,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` ServiceIndex int32 `protobuf:"varint,13,opt,name=service_index,json=serviceIndex,proto3" json:"service_index,omitempty"` ServiceDependency string `protobuf:"bytes,14,opt,name=service_dependency,json=serviceDependency,proto3" json:"service_dependency,omitempty"` EtcdAddr string `protobuf:"bytes,15,opt,name=etcd_addr,json=etcdAddr,proto3" json:"etcd_addr,omitempty"` EtcdKeyspace string `protobuf:"bytes,16,opt,name=etcd_keyspace,json=etcdKeyspace,proto3" json:"etcd_keyspace,omitempty"` EtcdLeaseTtl int32 `protobuf:"varint,17,opt,name=etcd_lease_ttl,json=etcdLeaseTtl,proto3" json:"etcd_lease_ttl,omitempty"` NetInterfaces []*InterfaceAddr `protobuf:"bytes,20,rep,name=net_interfaces,json=netInterfaces,proto3" json:"net_interfaces,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
通用环境变量
func (*Environ) Descriptor ¶
func (*Environ) GetAppAccessKey ¶
func (*Environ) GetAppChannelId ¶
func (*Environ) GetAppGameId ¶
func (*Environ) GetAppLogLevel ¶
func (*Environ) GetAppPprofAddr ¶
func (*Environ) GetAppServerId ¶
func (*Environ) GetAppServerName ¶
func (*Environ) GetAppWorkingDir ¶
func (*Environ) GetEtcdAddr ¶
func (*Environ) GetEtcdKeyspace ¶
func (*Environ) GetEtcdLeaseTtl ¶
func (*Environ) GetNetInterfaces ¶
func (m *Environ) GetNetInterfaces() []*InterfaceAddr
func (*Environ) GetServiceDependency ¶
func (*Environ) GetServiceIndex ¶
func (*Environ) GetServiceType ¶
func (*Environ) MarshalToSizedBuffer ¶
func (*Environ) ProtoMessage ¶
func (*Environ) ProtoMessage()
func (*Environ) XXX_DiscardUnknown ¶
func (m *Environ) XXX_DiscardUnknown()
func (*Environ) XXX_Marshal ¶
func (*Environ) XXX_Unmarshal ¶
type InterfaceAddr ¶
type InterfaceAddr struct { BindAddr string `protobuf:"bytes,1,opt,name=bind_addr,json=bindAddr,proto3" json:"bind_addr,omitempty"` AdvertiseAddr string `protobuf:"bytes,2,opt,name=advertise_addr,json=advertiseAddr,proto3" json:"advertise_addr,omitempty"` Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
地址接口,对外地址@bind地址:端口,如example.com@0.0.0.0:9527
func (*InterfaceAddr) Descriptor ¶
func (*InterfaceAddr) Descriptor() ([]byte, []int)
func (*InterfaceAddr) GetAdvertiseAddr ¶
func (m *InterfaceAddr) GetAdvertiseAddr() string
func (*InterfaceAddr) GetBindAddr ¶
func (m *InterfaceAddr) GetBindAddr() string
func (*InterfaceAddr) GetPort ¶
func (m *InterfaceAddr) GetPort() int32
func (*InterfaceAddr) Marshal ¶
func (m *InterfaceAddr) Marshal() (dAtA []byte, err error)
func (*InterfaceAddr) MarshalToSizedBuffer ¶
func (m *InterfaceAddr) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InterfaceAddr) ProtoMessage ¶
func (*InterfaceAddr) ProtoMessage()
func (*InterfaceAddr) Reset ¶
func (m *InterfaceAddr) Reset()
func (*InterfaceAddr) Size ¶
func (m *InterfaceAddr) Size() (n int)
func (*InterfaceAddr) String ¶
func (m *InterfaceAddr) String() string
func (*InterfaceAddr) Unmarshal ¶
func (m *InterfaceAddr) Unmarshal(dAtA []byte) error
func (*InterfaceAddr) XXX_DiscardUnknown ¶
func (m *InterfaceAddr) XXX_DiscardUnknown()
func (*InterfaceAddr) XXX_Marshal ¶
func (m *InterfaceAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InterfaceAddr) XXX_Merge ¶
func (m *InterfaceAddr) XXX_Merge(src proto.Message)
func (*InterfaceAddr) XXX_Size ¶
func (m *InterfaceAddr) XXX_Size() int
func (*InterfaceAddr) XXX_Unmarshal ¶
func (m *InterfaceAddr) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.