Documentation
¶
Overview ¶
Package functions is the API v6 client for Functions. Writes go to a Draft version and reach traffic only after a build; see pkg/api/v6/version.
Index ¶
- type Client
- func (c *Client) Build(ctx context.Context, id int64, versionID, comment string) error
- func (c *Client) CancelBuild(ctx context.Context, id int64, versionID string) error
- func (c *Client) Create(ctx context.Context, req sdk.FunctionsRequest) (version.Object, error)
- func (c *Client) CreateVersion(ctx context.Context, id int64, from, comment string) (string, error)
- func (c *Client) FindByName(ctx context.Context, name string) (version.Object, bool, error)
- func (c *Client) GetVersion(ctx context.Context, id int64, versionID string) (version.Meta, error)
- func (c *Client) UpdateVersion(ctx context.Context, id int64, versionID string, req sdk.FunctionsRequest) (version.Meta, error)
- func (c *Client) VersionState(ctx context.Context, id int64, versionID string) (version.State, error)
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 (*Client) CancelBuild ¶
CancelBuild asks the API to stop a build that has not settled.
func (*Client) CreateVersion ¶
CreateVersion opens a new Draft. An empty from clones the latest ready version. It returns the new version id.
func (*Client) FindByName ¶
FindByName returns the Function with exactly this name, if there is one. The list filter may also return near matches, which are ignored.
func (*Client) GetVersion ¶
GetVersion reads one version. Waits poll it, so a failure also carries the HTTP status (version.NewStatusError) for the retry rule.