services

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 69 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapEtcd

func BootstrapEtcd(ctx context.Context, r runtime.Runtime, req *machineapi.BootstrapRequest) error

BootstrapEtcd bootstraps the etcd cluster.

Current instance of etcd (not joined yet) is stopped, and new instance is started in bootstrap mode.

func IsDirEmpty

func IsDirEmpty(name string) (bool, error)

IsDirEmpty checks if a directory is empty or not.

Types

type APID

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

APID implements the Service interface. It serves as the concrete type with the required methods.

func (*APID) Condition

func (o *APID) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*APID) DependsOn

func (o *APID) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*APID) HealthFunc

func (o *APID) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*APID) HealthSettings

func (o *APID) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*APID) ID

func (o *APID) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*APID) PostFunc

func (o *APID) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*APID) PreFunc

func (o *APID) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*APID) Runner

func (o *APID) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type CRI

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

CRI implements the Service interface. It serves as the concrete type with the required methods.

func (*CRI) Client

func (c *CRI) Client() (*containerd.Client, error)

Client lazy-initializes the containerd client if needed and returns it.

func (*CRI) Condition

func (c *CRI) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*CRI) DependsOn

func (c *CRI) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*CRI) HealthFunc

func (c *CRI) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*CRI) HealthSettings

func (c *CRI) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*CRI) ID

func (c *CRI) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*CRI) PostFunc

func (c *CRI) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*CRI) PreFunc

func (c *CRI) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*CRI) Runner

func (c *CRI) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Containerd

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

Containerd implements the Service interface. It serves as the concrete type with the required methods.

func (*Containerd) Client

func (c *Containerd) Client() (*containerd.Client, error)

Client lazy-initializes the containerd client if needed and returns it.

func (*Containerd) Condition

func (c *Containerd) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Containerd) DependsOn

func (c *Containerd) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Containerd) HealthFunc

func (c *Containerd) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Containerd) HealthSettings

func (c *Containerd) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Containerd) ID

func (c *Containerd) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Containerd) PostFunc

func (c *Containerd) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Containerd) PreFunc

func (c *Containerd) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Containerd) Runner

func (c *Containerd) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Dashboard added in v1.4.0

type Dashboard struct{}

Dashboard implements the Service interface. It serves as the concrete type with the required methods.

func (*Dashboard) Condition added in v1.4.0

func (d *Dashboard) Condition(_ runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Dashboard) DependsOn added in v1.4.0

func (d *Dashboard) DependsOn(_ runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Dashboard) ID added in v1.4.0

func (d *Dashboard) ID(_ runtime.Runtime) string

ID implements the Service interface.

func (*Dashboard) PostFunc added in v1.4.0

func (d *Dashboard) PostFunc(_ runtime.Runtime, _ events.ServiceState) error

PostFunc implements the Service interface.

func (*Dashboard) PreFunc added in v1.4.0

func (d *Dashboard) PreFunc(_ context.Context, _ runtime.Runtime) error

PreFunc implements the Service interface.

func (*Dashboard) Runner added in v1.4.0

func (d *Dashboard) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Etcd

type Etcd struct {
	Bootstrap            bool
	RecoverFromSnapshot  bool
	RecoverSkipHashCheck bool
	// contains filtered or unexported fields
}

Etcd implements the Service interface. It serves as the concrete type with the required methods.

func (*Etcd) Condition

func (e *Etcd) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Etcd) DependsOn

func (e *Etcd) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Etcd) HealthFunc

func (e *Etcd) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Etcd) HealthSettings

func (e *Etcd) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Etcd) ID

func (e *Etcd) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Etcd) PostFunc

func (e *Etcd) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Etcd) PreFunc

func (e *Etcd) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Etcd) Runner

func (e *Etcd) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Extension

type Extension struct {
	Spec *extservices.Spec
	// contains filtered or unexported fields
}

Extension service is a generic wrapper around extension services spec.

func (*Extension) APIRestartAllowed

func (svc *Extension) APIRestartAllowed(runtime.Runtime) bool

APIRestartAllowed implements APIRestartableService.

func (*Extension) APIStartAllowed

func (svc *Extension) APIStartAllowed(runtime.Runtime) bool

APIStartAllowed implements APIStartableService.

func (*Extension) APIStopAllowed

func (svc *Extension) APIStopAllowed(runtime.Runtime) bool

APIStopAllowed implements APIStoppableService.

func (*Extension) Condition

func (svc *Extension) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Extension) DependsOn

func (svc *Extension) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Extension) ID

func (svc *Extension) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Extension) PostFunc

func (svc *Extension) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Extension) PreFunc

func (svc *Extension) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Extension) Runner

func (svc *Extension) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Kubelet

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

Kubelet implements the Service interface. It serves as the concrete type with the required methods.

func (*Kubelet) APIRestartAllowed

func (k *Kubelet) APIRestartAllowed(runtime.Runtime) bool

APIRestartAllowed implements APIRestartableService.

func (*Kubelet) APIStartAllowed

func (k *Kubelet) APIStartAllowed(runtime.Runtime) bool

APIStartAllowed implements APIStartableService.

func (*Kubelet) Condition

func (k *Kubelet) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Kubelet) DependsOn

func (k *Kubelet) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Kubelet) HealthFunc

func (k *Kubelet) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Kubelet) HealthSettings

func (k *Kubelet) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Kubelet) ID

func (k *Kubelet) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Kubelet) PostFunc

func (k *Kubelet) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Kubelet) PreFunc

func (k *Kubelet) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Kubelet) Runner

func (k *Kubelet) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Machined

type Machined struct {
	Controller runtime.Controller
}

Machined implements the Service interface. It serves as the concrete type with the required methods.

func (*Machined) Condition

func (m *Machined) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Machined) DependsOn

func (m *Machined) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Machined) HealthFunc

func (m *Machined) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Machined) HealthSettings

func (m *Machined) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Machined) ID

func (m *Machined) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Machined) PostFunc

func (m *Machined) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Machined) PreFunc

func (m *Machined) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Machined) Runner

func (m *Machined) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Trustd

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

Trustd implements the Service interface. It serves as the concrete type with the required methods.

func (*Trustd) Condition

func (t *Trustd) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Trustd) DependsOn

func (t *Trustd) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Trustd) HealthFunc

func (t *Trustd) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Trustd) HealthSettings

func (t *Trustd) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Trustd) ID

func (t *Trustd) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Trustd) PostFunc

func (t *Trustd) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Trustd) PreFunc

func (t *Trustd) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Trustd) Runner

func (t *Trustd) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

type Udevd

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

Udevd implements the Service interface. It serves as the concrete type with the required methods.

func (*Udevd) Condition

func (c *Udevd) Condition(r runtime.Runtime) conditions.Condition

Condition implements the Service interface.

func (*Udevd) DependsOn

func (c *Udevd) DependsOn(r runtime.Runtime) []string

DependsOn implements the Service interface.

func (*Udevd) HealthFunc

func (c *Udevd) HealthFunc(runtime.Runtime) health.Check

HealthFunc implements the HealthcheckedService interface.

func (*Udevd) HealthSettings

func (c *Udevd) HealthSettings(runtime.Runtime) *health.Settings

HealthSettings implements the HealthcheckedService interface.

func (*Udevd) ID

func (c *Udevd) ID(r runtime.Runtime) string

ID implements the Service interface.

func (*Udevd) PostFunc

func (c *Udevd) PostFunc(r runtime.Runtime, state events.ServiceState) (err error)

PostFunc implements the Service interface.

func (*Udevd) PreFunc

func (c *Udevd) PreFunc(ctx context.Context, r runtime.Runtime) error

PreFunc implements the Service interface.

func (*Udevd) Runner

func (c *Udevd) Runner(r runtime.Runtime) (runner.Runner, error)

Runner implements the Service interface.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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