Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attributes ¶
func Attributes() attributes
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Client ¶
func (c *Client) Client() *grpc.ClientConn
Client return the original gRPC ClientConn object.
type ClientAttributes ¶ added in v1.2.0
type ClientAttributes struct {
// contains filtered or unexported fields
}
func (*ClientAttributes) SetMaxActiveServers ¶ added in v1.2.0
func (ca *ClientAttributes) SetMaxActiveServers(count int)
type RPCPlatform ¶
type RPCPlatform struct {
// contains filtered or unexported fields
}
func New ¶
New creates an RPCPlatform object for further creation of clients and servers. All methods of this object are thread safe. You can create this object once and use it in different places in your program.
func (*RPCPlatform) NewClient ¶
func (p *RPCPlatform) NewClient(target string, attributes *ClientAttributes) (*Client, error)
NewClient creates a new client. You need to provide the target server name. If no additional settings are needed, attributes can be nil.
func (*RPCPlatform) NewServer ¶
func (p *RPCPlatform) NewServer(name, addr string, attributes *ServerAttributes, publicAddr ...string) (*Server, error)
NewServer creates a new server. You need to provide the server name, listening address and attributes. Optional param `publicAddr` used if server can't reachable by listening address. If no additional settings are needed, attributes can be nil.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
type ServerAttributes ¶
type ServerAttributes struct {
// contains filtered or unexported fields
}
func (*ServerAttributes) SetBalancerPriority ¶ added in v1.2.0
func (sa *ServerAttributes) SetBalancerPriority(priority int)
func (*ServerAttributes) SetBalancerWeight ¶
func (sa *ServerAttributes) SetBalancerWeight(weight int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.