sherlock

package
v0.0.63 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains an API client for a remote sherlock server

func New

func New(config config.Config, iapToken string) (*Client, error)

New configures a new Client instance which confers the ability to issue requests against the API of a sherlock server

func NewWithHostnameOverride added in v0.0.63

func NewWithHostnameOverride(addr, iapToken string) (*Client, error)

NewWithHostNameOverride enables thelma commands to utilize a sherlock client that targets a different sherlock instance from the one used for state loading

func (*Client) ClusterReleases

func (c *Client) ClusterReleases(clusterName string) (Releases, error)

func (*Client) Clusters

func (c *Client) Clusters() (Clusters, error)

func (*Client) EnvironmentReleases

func (c *Client) EnvironmentReleases(environmentName string) (Releases, error)

func (*Client) Environments

func (c *Client) Environments() (Environments, error)

func (*Client) WriteClusters added in v0.0.63

func (s *Client) WriteClusters(cls []terra.Cluster) error

WriteClusters will take a list of terra.Cluster interfaces them and issue POST requests to create both the cluster and any releases within that cluster. 409 Conflict responses are ignored

func (*Client) WriteEnvironments added in v0.0.63

func (s *Client) WriteEnvironments(envs []terra.Environment) error

WriteEnvironments will take a list of terra.Environment interfaces them and issue POST requests to write both the environment and any releases within that environment. 409 Conflict responses are ignored

type Cluster

type Cluster struct {
	*models.V2controllersCluster
}

type Clusters

type Clusters []Cluster

type Environment

type Environment struct {
	*models.V2controllersEnvironment
}

type Environments

type Environments []Environment

type Release

type Release struct {
	*models.V2controllersChartRelease
}

func (*Release) HelmfileRefOrDefault

func (r *Release) HelmfileRefOrDefault(def string) string

type Releases

type Releases []Release

type StateLoader

type StateLoader interface {
	Environments() (Environments, error)
	Clusters() (Clusters, error)
	ClusterReleases(clusterName string) (Releases, error)
	EnvironmentReleases(environmentName string) (Releases, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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