api

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMux added in v1.24.0

func NewMux(config crcConfig.Storage, machine machine.Client, logger Logger, telemetry Telemetry) http.Handler

Types

type AdaptedClient added in v1.20.0

type AdaptedClient interface {
	Delete() client.Result
	GetConsoleURL() client.ConsoleResult
	Start(ctx context.Context, startConfig types.StartConfig) client.StartResult
	Status() client.ClusterStatusResult
	Stop() client.Result
	PowerOff() client.Result
}

type Adapter added in v1.20.0

type Adapter struct {
	Underlying machine.Client
}

func (*Adapter) Delete added in v1.20.0

func (a *Adapter) Delete() client.Result

func (*Adapter) GetConsoleURL added in v1.20.0

func (a *Adapter) GetConsoleURL() client.ConsoleResult

func (*Adapter) PowerOff added in v1.28.0

func (a *Adapter) PowerOff() client.Result

func (*Adapter) Start added in v1.20.0

func (a *Adapter) Start(ctx context.Context, startConfig types.StartConfig) client.StartResult

func (*Adapter) Status added in v1.20.0

func (a *Adapter) Status() client.ClusterStatusResult

func (*Adapter) Stop added in v1.20.0

func (a *Adapter) Stop() client.Result

type Handler added in v1.20.0

type Handler struct {
	Logger        Logger
	MachineClient AdaptedClient
	Config        crcConfig.Storage
	Telemetry     Telemetry
}

func NewHandler added in v1.24.0

func NewHandler(config crcConfig.Storage, machine machine.Client, logger Logger, telemetry Telemetry) *Handler

func (*Handler) Delete added in v1.20.0

func (h *Handler) Delete() string

func (*Handler) GetConfig added in v1.20.0

func (h *Handler) GetConfig(args json.RawMessage) string

func (*Handler) GetVersion added in v1.20.0

func (h *Handler) GetVersion() string

func (*Handler) GetWebconsoleInfo added in v1.20.0

func (h *Handler) GetWebconsoleInfo() string

func (*Handler) Logs added in v1.24.0

func (h *Handler) Logs() string

func (*Handler) PowerOff added in v1.28.0

func (h *Handler) PowerOff() string

func (*Handler) SetConfig added in v1.20.0

func (h *Handler) SetConfig(args json.RawMessage) string

func (*Handler) Start added in v1.20.0

func (h *Handler) Start(args json.RawMessage) string

func (*Handler) Status added in v1.20.0

func (h *Handler) Status() string

func (*Handler) Stop added in v1.20.0

func (h *Handler) Stop() string

func (*Handler) UnsetConfig added in v1.20.0

func (h *Handler) UnsetConfig(args json.RawMessage) string

func (*Handler) UploadTelemetry added in v1.26.0

func (h *Handler) UploadTelemetry(args json.RawMessage) string

type Logger added in v1.24.0

type Logger interface {
	Messages() []string
}

type Server added in v1.23.0

type Server struct {
	// contains filtered or unexported fields
}

func CreateServer added in v1.23.0

func CreateServer(socketPath string, config crcConfig.Storage, machine machine.Client, logger Logger, telemetry Telemetry) (Server, error)

func (Server) Serve added in v1.23.0

func (api Server) Serve() error

type Telemetry added in v1.26.0

type Telemetry interface {
	UploadAction(action, source, status string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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