Documentation
¶
Index ¶
- func TCPAddrFromServerSetEndpoint(ep *ServerSetEndpoint) (*net.TCPAddr, error)
- type GRPC
- type GRPCOperation
- type Roxy
- func (r *Roxy) AsGRPC(namedPort string) (*GRPC, error)
- func (r *Roxy) AsRoxyJSON() (*RoxyJSON, error)
- func (r *Roxy) AsServerSet() (*ServerSet, error)
- func (r *Roxy) FromGRPC(grpc *GRPC) error
- func (r *Roxy) FromRoxyJSON(x *RoxyJSON) error
- func (r *Roxy) FromServerSet(ss *ServerSet) error
- func (r *Roxy) MarshalJSON() ([]byte, error)
- func (r *Roxy) NamedAddr(namedPort string) *net.TCPAddr
- func (r *Roxy) NamedPorts() []string
- func (r *Roxy) Parse(raw []byte) error
- func (r *Roxy) PrimaryAddr() *net.TCPAddr
- func (r *Roxy) UnmarshalJSON(raw []byte) error
- type RoxyJSON
- type ServerSet
- type ServerSetEndpoint
- type ServerSetStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TCPAddrFromServerSetEndpoint ¶
func TCPAddrFromServerSetEndpoint(ep *ServerSetEndpoint) (*net.TCPAddr, error)
Types ¶
type GRPC ¶
type GRPC struct {
Op GRPCOperation `json:"Op"`
Addr string `json:"Addr"`
Metadata interface{} `json:"Metadata,omitempty"`
}
type GRPCOperation ¶
type GRPCOperation uint8
const ( GRPCOpAdd GRPCOperation = iota GRPCOpDelete GRPCOpInvalid = ^GRPCOperation(0) )
func (GRPCOperation) GoString ¶
func (op GRPCOperation) GoString() string
func (GRPCOperation) MarshalJSON ¶
func (op GRPCOperation) MarshalJSON() ([]byte, error)
func (GRPCOperation) String ¶
func (op GRPCOperation) String() string
func (*GRPCOperation) UnmarshalJSON ¶
func (ptr *GRPCOperation) UnmarshalJSON(raw []byte) error
type Roxy ¶
type Roxy struct {
Ready bool
IP net.IP
Zone string
ServerName string
PrimaryPort uint16
AdditionalPorts map[string]uint16
ShardID *uint32
Metadata map[string]string
}
func (*Roxy) AsRoxyJSON ¶
func (*Roxy) AsServerSet ¶
func (*Roxy) FromRoxyJSON ¶
func (*Roxy) FromServerSet ¶
func (*Roxy) MarshalJSON ¶
func (*Roxy) NamedPorts ¶
func (*Roxy) PrimaryAddr ¶
func (*Roxy) UnmarshalJSON ¶
type RoxyJSON ¶
type RoxyJSON struct {
Ready bool `json:"ready"`
IP string `json:"ip,omitempty"`
Zone string `json:"zone,omitempty"`
ServerName string `json:"serverName,omitempty"`
PrimaryPort uint16 `json:"primaryPort,omitempty"`
AdditionalPorts map[string]uint16 `json:"additionalPorts,omitempty"`
ShardID *uint32 `json:"shardID,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type ServerSet ¶
type ServerSet struct {
ServiceEndpoint *ServerSetEndpoint `json:"serviceEndpoint"`
AdditionalEndpoints map[string]*ServerSetEndpoint `json:"additionalEndpoints"`
Status ServerSetStatus `json:"status"`
ShardID *int32 `json:"shardId,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type ServerSetEndpoint ¶
func ServerSetEndpointFromTCPAddr ¶
func ServerSetEndpointFromTCPAddr(addr *net.TCPAddr) *ServerSetEndpoint
func (*ServerSetEndpoint) TCPAddr ¶
func (ep *ServerSetEndpoint) TCPAddr() *net.TCPAddr
type ServerSetStatus ¶
type ServerSetStatus uint8
const ( StatusDead ServerSetStatus = iota StatusStarting StatusAlive StatusStopping StatusStopped StatusWarning )
func (ServerSetStatus) GoString ¶
func (st ServerSetStatus) GoString() string
func (ServerSetStatus) MarshalJSON ¶
func (st ServerSetStatus) MarshalJSON() ([]byte, error)
func (ServerSetStatus) String ¶
func (st ServerSetStatus) String() string
func (*ServerSetStatus) UnmarshalJSON ¶
func (st *ServerSetStatus) UnmarshalJSON(raw []byte) error
Click to show internal directories.
Click to hide internal directories.