hpaas_client_go

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 13 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 is a hpaas gRPC client

func NewClient

func NewClient(ctx context.Context, target string, opts ...Opt) (*Client, error)

NewClient creates a new gRPC hpaas client

func (*Client) GetApp added in v0.0.29

func (c *Client) GetApp(ctx context.Context, input *hpaaspb.AppRef) (*hpaaspb.App, error)

GetApp gets an app/release from the given namespace

func (*Client) GetHistory added in v0.0.30

func (c *Client) GetHistory(ctx context.Context, input *hpaaspb.HistoryFilter) (*hpaaspb.Apps, error)

GetHistory gets a list of previous versions for the app/release

func (*Client) InstallApp added in v0.0.29

func (c *Client) InstallApp(ctx context.Context, input *hpaaspb.AppInput) (*hpaaspb.App, error)

InstallApp installs an app/release in the given namespace

func (*Client) RollbackApp added in v0.0.29

func (c *Client) RollbackApp(ctx context.Context, input *hpaaspb.AppRef) error

RollbackApp rolls the app/release back to the previous version in the given namespace

func (*Client) SearchApps added in v0.0.30

func (c *Client) SearchApps(ctx context.Context, input *hpaaspb.AppFilter) (*hpaaspb.Apps, error)

SearchApps searches for apps/releases.

func (*Client) SearchCharts added in v0.0.29

func (c *Client) SearchCharts(ctx context.Context, input *hpaaspb.ChartFilter) (*hpaaspb.Charts, error)

SearchCharts searches for a local/cached helm chart

func (*Client) UninstallApp added in v0.0.29

func (c *Client) UninstallApp(ctx context.Context, input *hpaaspb.AppRef) error

UninstallApp uninstalls an app/release from the given namespace

func (*Client) UpdateApp added in v0.0.29

func (c *Client) UpdateApp(ctx context.Context, input *hpaaspb.AppInput) (*hpaaspb.App, error)

UpdateApp updates an app/release in the given namespace

type Opt

type Opt func(o *Options)

Opt is a single configuration option

func WithIDToken added in v0.0.29

func WithIDToken(idToken bool) Opt

WithIDToken makes the client use the oauth id token(if it exists) instead of the oauth access token

func WithLogging

func WithLogging(logging, logPayload bool) Opt

WithLogging registers a logging middleware

func WithMetrics

func WithMetrics(metrics bool) Opt

WithMetrics registers prometheus metrics

func WithTokenSource

func WithTokenSource(tokenSource oauth2.TokenSource) Opt

WithTokenSource uses oauth token add an authorization header to every outbound request

func WithTransportCreds

func WithTransportCreds(creds credentials.TransportCredentials) Opt

WithTransportCreds adds transport credentials to the client

type Options

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

Options holds configuration options

Jump to

Keyboard shortcuts

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