Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is sabakan-state-setter controller
func NewController ¶
func NewController(etcdClient *clientv3.Client, sabakanAddress, serfAddress, configFile, electionValue string, interval time.Duration, parallelSize int, sessionTTL time.Duration) (*Controller, error)
NewController returns controller for sabakan-state-setter
func (*Controller) ClearUnhealthy ¶
func (c *Controller) ClearUnhealthy(m *machine)
ClearUnhealthy removes machine from unhealthy registry.
func (*Controller) RegisterUnhealthy ¶
func (c *Controller) RegisterUnhealthy(m *machine, now time.Time) bool
RegisterUnhealthy registers unhealthy machine and returns true if the machine has been unhealthy longer than the GracePeriod specified in its machine type.
type NecoCmdExecutor ¶
type NecoCmdExecutor interface { PowerStop(ctx context.Context, serial string) ([]byte, error) PowerStatus(ctx context.Context, serial string) ([]byte, error) TPMClear(ctx context.Context, serial string) ([]byte, error) }
NecoCmdExecutor is interface for the neco command
type PrometheusClient ¶
type PrometheusClient interface {
ConnectMetricsServer(ctx context.Context, addr string) (map[string]*dto.MetricFamily, error)
}
PrometheusClient is interface for prometheus client
type SabakanClientWrapper ¶
type SabakanClientWrapper interface { GetAllMachines(ctx context.Context) ([]*machine, error) GetRetiredMachines(ctx context.Context) ([]*machine, error) UpdateSabakanState(ctx context.Context, serial string, state sabakan.MachineState) error CryptsDelete(ctx context.Context, serial string) error }
SabakanClientWrapper is interface of the sabakan client for sbakan-state-setter
type SerfClient ¶
SerfClient is interface for serf client
Source Files ¶
Click to show internal directories.
Click to hide internal directories.