Documentation ¶
Index ¶
- func SCMarshal(s interface{}) ([]byte, error)
- func SCUnmarshal(data []byte, out interface{}) error
- type Client
- func (c *Client) AcquireMasterLock(areaID, serverType string, lID int64) (int64, error)
- func (c *Client) GetEdgeCounts(selfServerID string) (int, error)
- func (c *Client) GetServers(nodeType string) (*clientv3.GetResponse, error)
- func (c *Client) PutEdgeCount(serverID string, count int) error
- func (c *Client) ReleaseMasterLock(leaseID int64, areaID, serverType string) error
- func (c *Client) ServerRegister(t context.Context, serverID, nodeType, value string) error
- func (c *Client) ServerUnRegister(t context.Context, serverID, nodeType string) error
- func (c *Client) WatchServers(ctx context.Context, nodeType string) clientv3.WatchChan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SCUnmarshal ¶
SCUnmarshal Unmarshal SchedulerCfg
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client etcd client
func (*Client) AcquireMasterLock ¶
AcquireMasterLock Request to become a master server
func (*Client) GetEdgeCounts ¶ added in v0.1.13
func (*Client) GetServers ¶
func (c *Client) GetServers(nodeType string) (*clientv3.GetResponse, error)
GetServers get servers
func (*Client) PutEdgeCount ¶ added in v0.1.13
func (*Client) ReleaseMasterLock ¶
ReleaseMasterLock release master lock
func (*Client) ServerRegister ¶
ServerRegister register to etcd , If already register in, return an error
func (*Client) ServerUnRegister ¶
ServerUnRegister UnRegister to etcd
Click to show internal directories.
Click to hide internal directories.