client

package
v0.0.0-...-8a6f205 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Name string
	client.Client
	NewRequest func() *repairmanv1.MaintenanceRequest
}

Client implementation for the repairman client

func New

func New(clientName string, c client.Client) (*Client, error)

New intializes repairman client

func (*Client) IsEnabled

func (c *Client) IsEnabled(rtype string) (bool, error)

IsEnabled checks if repairman is enabled on server

func (*Client) IsMaintenanceApproved

func (c *Client) IsMaintenanceApproved(ctx context.Context, name, rtype string) (bool, error)

IsMaintenanceApproved checks if a maintenance request on a name and type is approved

func (*Client) UpdateMaintenanceState

func (c *Client) UpdateMaintenanceState(ctx context.Context, name, rtype string, desiredState repairmanv1.MaintenanceState) error

UpdateMaintenanceState sets desired state if a live (not completed) maintenance request exists

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL