k8s_service

package
v0.0.0-...-2a43829 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptsAll

func OptsAll(smID string, overwriteOps ...opts.ExtraOpts) *opts.Opts

OptsAll returns the options required to get all the service tools, ie. SM, client, and generator.

func OptsNoGenerator

func OptsNoGenerator(smID string, overwriteOps ...opts.ExtraOpts) *opts.Opts

OptsNoGenerator returns the options required to get the SM and client.

Types

type Client

type Client struct {
	client.BaseClient[Client]
	// contains filtered or unexported fields
}

Client is the client for the Harbor service. It contains a BaseClient, which is used to lazy-load and cache data.

func New

func New(cache ...*core.Cache) *Client

New creates a new Client and injects the cache. If a cache is not supplied it will create a new one.

func (*Client) Client

func (c *Client) Client(userID string, zone *configModels.Zone) (*k8s.Client, error)

Client returns the K8s service client.

func (*Client) Create

func (c *Client) Create(id string, params *model.SmCreateParams) error

Create creates the storage manager.

It creates all K8s resources for the storage manager.

func (*Client) Delete

func (c *Client) Delete(id string) error

Delete deletes the storage manager.

It deletes all K8s resources for the storage manager.

func (*Client) Generator

func (c *Client) Generator(sm *model.SM, client *k8s.Client, zone *configModels.Zone) generators.K8sGenerator

Generator returns the K8s generator.

func (*Client) Get

func (c *Client) Get(opts *opts.Opts) (*model.SM, *k8s.Client, generators.K8sGenerator, error)

Get returns the deployment, client, and generator.

Depending on the options specified, some return values may be nil. This is useful when you don't always need all the resources.

func (*Client) Repair

func (c *Client) Repair(id string) error

Repair repairs the storage manager.

It repairs all K8s resources for the storage manager.

Jump to

Keyboard shortcuts

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