api

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 19 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) http.Handler

Types

type AdaptedClient added in v1.20.0

type AdaptedClient interface {
	GetName() string
	Delete() client.Result
	GetConsoleURL() client.ConsoleResult
	Start(ctx context.Context, startConfig machine.StartConfig) client.StartResult
	Status() client.ClusterStatusResult
	Stop() 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) GetName added in v1.20.0

func (a *Adapter) GetName() string

func (*Adapter) Start added in v1.20.0

func (a *Adapter) Start(ctx context.Context, startConfig machine.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
}

func NewHandler added in v1.24.0

func NewHandler(config crcConfig.Storage, machine machine.Client) *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) 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

type Logger added in v1.24.0

type Logger interface {
	Messages() []string
}

type RequestHandler added in v1.20.0

type RequestHandler interface {
	Start(json.RawMessage) string
	Stop() string
	Status() string
	Delete() string
	GetVersion() string
	SetConfig(json.RawMessage) string
	UnsetConfig(json.RawMessage) string
	GetConfig(json.RawMessage) string
	GetWebconsoleInfo() string
	Logs() 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) (Server, error)

func (Server) Serve added in v1.23.0

func (api Server) Serve() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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