Documentation ¶
Overview ¶
* * @Author: xhzhang * @Date: 2019-04-18 16:36
* * @Author: xhzhang * @Date: 2019-04-19 10:12
* * @Author: xhzhang * @Date: 2019-04-19 10:25
Index ¶
- func DealRecieveService(w http.ResponseWriter, r *http.Request)
- func InitAgent(etc string)
- func Run()
- type Agent
- func (a *Agent) AddService(s executor.Service)
- func (a *Agent) CheckRegisterIsExist(id string) bool
- func (a *Agent) CheckServiceIsExist(sidlist []string) ([]string, []string)
- func (a *Agent) GetService(serviceid string) executor.Service
- func (a *Agent) SetAgentID(uuidfile string)
- func (a *Agent) SetEtcdKey()
- func (a *Agent) SetEtcdVal()
- func (a *Agent) SetInstructionChannel()
- func (a *Agent) SetServicePrefix()
- func (a *Agent) SetServicesStruct(slist []executor.Service)
- func (a *Agent) SyncService(s executor.Service)
- type Executor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DealRecieveService ¶
func DealRecieveService(w http.ResponseWriter, r *http.Request)
Register handler
Types ¶
type Agent ¶
type Agent struct { AgentID string EtcdKey string EtcdVal string InstructionChannel string GraceChannel string Services []executor.Service ServicePrefix string }
var CurAgent *Agent
func (*Agent) CheckRegisterIsExist ¶
When registering a service, check if the service exists
func (*Agent) CheckServiceIsExist ¶
func (*Agent) GetService ¶
Returns the service according to serviceid
func (*Agent) SetAgentID ¶
func (*Agent) SetEtcdKey ¶
func (a *Agent) SetEtcdKey()
func (*Agent) SetEtcdVal ¶
func (a *Agent) SetEtcdVal()
func (*Agent) SetInstructionChannel ¶
func (a *Agent) SetInstructionChannel()
func (*Agent) SetServicesStruct ¶
set []Service to a.Services
Click to show internal directories.
Click to hide internal directories.