state

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PostgresURL string
	Corrosion   corroclient.Config
}

type State

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

func New

func New(pgxpool *pgxpool.Pool, clusterState cluster.ClusterState) *State

func (*State) CreateFleet

func (s *State) CreateFleet(ctx context.Context, fleet api.Fleet) error

func (*State) CreateGateway

func (s *State) CreateGateway(gateway api.Gateway) error

func (*State) CreateMachine

func (s *State) CreateMachine(machine cluster.Machine, mv api.MachineVersion) error

func (*State) CreateNamespace

func (s *State) CreateNamespace(ctx context.Context, namespace api.Namespace) error

func (*State) DeleteGateway

func (s *State) DeleteGateway(ctx context.Context, id string) error

func (*State) DestroyFleet

func (s *State) DestroyFleet(ctx context.Context, id string) error

func (*State) DestroyMachine

func (s *State) DestroyMachine(ctx context.Context, id string) error

func (*State) DestroyNamespace

func (q *State) DestroyNamespace(ctx context.Context, name string) error

func (*State) GetAPIMachine

func (s *State) GetAPIMachine(ctx context.Context, namespace, fleetId, id string) (*api.Machine, error)

func (*State) GetFleet

func (s *State) GetFleet(ctx context.Context, namespace string, idOrName string) (*api.Fleet, error)

func (*State) GetGateway

func (s *State) GetGateway(ctx context.Context, namespace, idOrName string) (api.Gateway, error)

func (*State) GetMachine

func (s *State) GetMachine(ctx context.Context, namespace, fleetId, id string, showDestroyed bool) (cluster.Machine, error)

func (*State) GetNamespace

func (s *State) GetNamespace(ctx context.Context, name string) (*api.Namespace, error)

func (*State) ListAPIMachines

func (s *State) ListAPIMachines(ctx context.Context, namespace, fleetId string, includeDestroyed bool) ([]api.Machine, error)

func (*State) ListFleets

func (s *State) ListFleets(ctx context.Context, namespace string) ([]api.Fleet, error)

func (*State) ListGateways

func (s *State) ListGateways(ctx context.Context, namespace string) ([]api.Gateway, error)

func (*State) ListMachineEvents

func (s *State) ListMachineEvents(ctx context.Context, machineId string) ([]api.MachineEvent, error)

func (*State) ListMachineVersions

func (s *State) ListMachineVersions(ctx context.Context, machineId string) ([]api.MachineVersion, error)

func (*State) ListNamespaces

func (s *State) ListNamespaces(ctx context.Context) ([]api.Namespace, error)

func (*State) StoreMachineEvent

func (s *State) StoreMachineEvent(ctx context.Context, event api.MachineEvent) error

func (*State) UpdateMachine

func (s *State) UpdateMachine(machine cluster.Machine) error

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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