client

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 19 Imported by: 4

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
}

func New

func New(c *http.Client, router *mux.Router, endpoint string, t Token) *Client

func (*Client) Export

func (c *Client) Export(ctx context.Context) ([]byte, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, dest interface{}, route string, queryParams ...string) error

Get executes a get request against the Flux server. it unmarshals the response into dest, if not nil.

func (*Client) GitRepoConfig

func (c *Client) GitRepoConfig(ctx context.Context, regenerate bool) (v6.GitConfig, error)

func (*Client) JobStatus

func (c *Client) JobStatus(ctx context.Context, jobID job.ID) (job.Status, error)

func (*Client) ListImages

func (c *Client) ListImages(ctx context.Context, s update.ResourceSpec) ([]v6.ImageStatus, error)

func (*Client) ListImagesWithOptions

func (c *Client) ListImagesWithOptions(ctx context.Context, opts v10.ListImagesOptions) ([]v6.ImageStatus, error)

func (*Client) ListServices

func (c *Client) ListServices(ctx context.Context, namespace string) ([]v6.ControllerStatus, error)

func (*Client) ListServicesWithOptions

func (c *Client) ListServicesWithOptions(ctx context.Context, opts v11.ListServicesOptions) ([]v6.ControllerStatus, error)

func (*Client) LogEvent

func (c *Client) LogEvent(ctx context.Context, event event.Event) error

func (*Client) NotifyChange

func (c *Client) NotifyChange(ctx context.Context, change v9.Change) error

func (*Client) PatchWithBody

func (c *Client) PatchWithBody(ctx context.Context, route string, body interface{}, queryParams ...string) error

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) Post

func (c *Client) Post(ctx context.Context, route string, queryParams ...string) error

Post is a simple query-param only post request

func (*Client) PostWithBody

func (c *Client) PostWithBody(ctx context.Context, route string, body interface{}, queryParams ...string) error

PostWithBody is a more complex post request, which includes a json-ified body. If body is not nil, it is encoded to json before sending

func (*Client) SyncStatus

func (c *Client) SyncStatus(ctx context.Context, ref string) ([]string, error)

func (*Client) UpdateManifests

func (c *Client) UpdateManifests(ctx context.Context, spec update.Spec) (job.ID, error)

func (*Client) Version

func (c *Client) Version(ctx context.Context) (string, error)

type Token

type Token string

func (Token) Set

func (t Token) Set(req *http.Request)

Jump to

Keyboard shortcuts

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