Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FILE_UUID = "/etc/.mole.uuid"
)
View Source
var (
HEADER = []byte("MOLE")
)
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) Accept ¶
implement net.Listener interface (process the cached worker connection in the pool)
func (*Agent) HandleWorkerConn ¶
put the worker connection to the pool
func (*Agent) ServeProtocol ¶
type ClusterAgent ¶
type ClusterAgent struct {
// contains filtered or unexported fields
}
ClusterAgent is a runtime agent object within master lifttime
func (*ClusterAgent) Client ¶
func (ca *ClusterAgent) Client() *http.Client
Client obtain a http client for an agent with customized dialer
type Config ¶
type Config struct { Role Role // both Listen string // master only Master *url.URL // agent only Backend *url.URL // agent only }
func ConfigFromEnv ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
NewDecoder returns a new protocol decoder that reads from r.
type Master ¶
func (*Master) Agent ¶
func (m *Master) Agent(id string) *ClusterAgent
the caller should check the returned ClusterAgent is not nil otherwise the agent hasn't connected to the cluster
func (*Master) Agents ¶
func (m *Master) Agents() map[string]*ClusterAgent
func (*Master) CloseAgent ¶
func (*Master) FreshAgent ¶
Click to show internal directories.
Click to hide internal directories.