Documentation ¶
Index ¶
- type WzWorkerClientKeysAPI
- type WzWorkerClientsAPI
- type WzWorkerDbh
- type WzWorkerJobAPI
- func (wdb *WzWorkerJobAPI) Delete(jid string)
- func (wdb *WzWorkerJobAPI) FlushAfter(point *time.Time)
- func (wdb *WzWorkerJobAPI) Get(jid string)
- func (wdb *WzWorkerJobAPI) GetAllByClient(client string, till *time.Time)
- func (wdb *WzWorkerJobAPI) GetFailed(client string)
- func (wdb *WzWorkerJobAPI) GetUnfinished(client string)
- func (wdb *WzWorkerJobAPI) New(client string)
- func (wdb *WzWorkerJobAPI) Update(jid string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WzWorkerClientKeysAPI ¶
type WzWorkerClientKeysAPI struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////// Client keys
func NewWzWorkerClientKeysAPI ¶
func NewWzWorkerClientKeysAPI() *WzWorkerClientKeysAPI
func (*WzWorkerClientKeysAPI) GetRSAPubkeyByFQDN ¶
func (wdb *WzWorkerClientKeysAPI) GetRSAPubkeyByFQDN(fqdn string)
GetRSAPubkeyByFQDN returns client's RSA public key in PEM format, queried by the FQDN.
func (*WzWorkerClientKeysAPI) GetRSAPubkeyByFp ¶
func (wdb *WzWorkerClientKeysAPI) GetRSAPubkeyByFp(fp string)
GetRSAPubkeyByFp returns client's RSA public key in PEM format, queried by the key fingerprint.
func (*WzWorkerClientKeysAPI) GetRSAPubkeyByMachineId ¶
func (wdb *WzWorkerClientKeysAPI) GetRSAPubkeyByMachineId(uid string)
GetRSAPubkeyByMachineId returns client's RSA public key in PEM format, queried by the machine ID.
type WzWorkerClientsAPI ¶
type WzWorkerClientsAPI struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////// Clients
func NewWzWorkerClientsAPI ¶
func NewWzWorkerClientsAPI() *WzWorkerClientsAPI
func (*WzWorkerClientsAPI) GetAssignedClients ¶
func (wca *WzWorkerClientsAPI) GetAssignedClients()
GetAssignedClients returns a slice of assigned client systems to the current worker. If there is only one worker, then it will get all of the client systems at once.
func (*WzWorkerClientsAPI) GetClientByFQDN ¶
func (wca *WzWorkerClientsAPI) GetClientByFQDN(fqdn string)
GetClientByFQDN returns client data and its traits by FQDN
func (*WzWorkerClientsAPI) GetClientByFp ¶
func (wca *WzWorkerClientsAPI) GetClientByFp(fp string)
GetClientByFf returns client data and its traits by RSA fingerprint
func (*WzWorkerClientsAPI) GetClientByMachineId ¶
func (wca *WzWorkerClientsAPI) GetClientByMachineId(uid string)
///////////////////////////////////////////////////// Query clients
type WzWorkerDbh ¶
type WzWorkerDbh struct {
// contains filtered or unexported fields
}
func NewWzWorkerDbh ¶
func NewWzWorkerDbh() *WzWorkerDbh
func (*WzWorkerDbh) GetClientsAPI ¶
func (wdb *WzWorkerDbh) GetClientsAPI() *WzWorkerClientsAPI
func (*WzWorkerDbh) GetJobsAPI ¶
func (wdb *WzWorkerDbh) GetJobsAPI() *WzWorkerJobAPI
func (*WzWorkerDbh) GetKeysAPI ¶
func (wdb *WzWorkerDbh) GetKeysAPI() *WzWorkerClientKeysAPI
func (*WzWorkerDbh) SetDbh ¶
func (wdb *WzWorkerDbh) SetDbh(dbh *gorm.DB)
Pass GORM database handler reference to the clients API
type WzWorkerJobAPI ¶
type WzWorkerJobAPI struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////// Job
func NewWorkerJobAPI ¶
func NewWorkerJobAPI() *WzWorkerJobAPI
func (*WzWorkerJobAPI) Delete ¶
func (wdb *WzWorkerJobAPI) Delete(jid string)
func (*WzWorkerJobAPI) FlushAfter ¶
func (wdb *WzWorkerJobAPI) FlushAfter(point *time.Time)
func (*WzWorkerJobAPI) Get ¶
func (wdb *WzWorkerJobAPI) Get(jid string)
func (*WzWorkerJobAPI) GetAllByClient ¶
func (wdb *WzWorkerJobAPI) GetAllByClient(client string, till *time.Time)
GetAllByClient returns all jobs, known in the log by the client
func (*WzWorkerJobAPI) GetFailed ¶
func (wdb *WzWorkerJobAPI) GetFailed(client string)
func (*WzWorkerJobAPI) GetUnfinished ¶
func (wdb *WzWorkerJobAPI) GetUnfinished(client string)
func (*WzWorkerJobAPI) New ¶
func (wdb *WzWorkerJobAPI) New(client string)
func (*WzWorkerJobAPI) Update ¶
func (wdb *WzWorkerJobAPI) Update(jid string)