Documentation ¶
Index ¶
- func HeaderHandler(key, value string, next http.Handler) http.Handler
- func NewServer(config *Config) (http.Handler, error)
- func POSTHandler(next http.Handler) http.Handler
- func ZincatiID(machineID string) (string, error)
- type Config
- type Message
- type RebootLease
- type RebootLock
- type Reply
- type ReplyKind
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HeaderHandler ¶
HeaderHandler returns a handler that requires a given header key/value.
func POSTHandler ¶
POSTHandler returns a handler that requires the POST method.
Types ¶
type Message ¶
type Message struct { ClientParmas struct { ID string `json:"id"` Group string `json:"group"` } `json:"client_params"` }
Message represents a FleetLock protocol client request.
type RebootLease ¶
type RebootLease struct { // name and metadata Meta metav1.ObjectMeta // wrapped coordination client Client coordclient.LeasesGetter // contains filtered or unexported fields }
RebootLease uses a Lease to hold a RebootLock.
func (*RebootLease) Get ¶
func (l *RebootLease) Get(ctx context.Context) (*RebootLock, error)
Get reads the RebootLock from the Lease or initializes a Lease.
func (*RebootLease) Name ¶
func (l *RebootLease) Name() string
Name returns the RebootLease namespace and name.
func (*RebootLease) Update ¶
func (l *RebootLease) Update(ctx context.Context, slot *RebootLock) error
Update tries to store the RebootLock into the the Lease.
type RebootLock ¶
RebootLock represents a node wishing to reboot.
type Reply ¶
type Reply struct { // reply identifier Kind ReplyKind `json:"kind"` // human-friendly reply message Value string `json:"value"` }
Reply represents a Fleetlock protocol reply.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.