Documentation ¶
Index ¶
- type Agent
- type Auth
- type Client
- type Config
- type Jobs
- func (j *Jobs) Executions(ctx context.Context, r *apimodels.ListJobExecutionsRequest) (*apimodels.ListJobExecutionsResponse, error)
- func (j *Jobs) Get(ctx context.Context, r *apimodels.GetJobRequest) (*apimodels.GetJobResponse, error)
- func (j *Jobs) History(ctx context.Context, r *apimodels.ListJobHistoryRequest) (*apimodels.ListJobHistoryResponse, error)
- func (j *Jobs) List(ctx context.Context, r *apimodels.ListJobsRequest) (*apimodels.ListJobsResponse, error)
- func (j *Jobs) Put(ctx context.Context, r *apimodels.PutJobRequest) (*apimodels.PutJobResponse, error)
- func (j *Jobs) Results(ctx context.Context, r *apimodels.ListJobResultsRequest) (*apimodels.ListJobResultsResponse, error)
- func (j *Jobs) Stop(ctx context.Context, r *apimodels.StopJobRequest) (*apimodels.StopJobResponse, error)
- type Nodes
- type OptionFn
- func WithAppID(appID string) OptionFn
- func WithCACertificate(cacert string) OptionFn
- func WithHTTPAuth(credential *apimodels.HTTPCredential) OptionFn
- func WithHTTPClient(client *http.Client) OptionFn
- func WithHeaders(headers http.Header) OptionFn
- func WithInsecureTLS(insecure bool) OptionFn
- func WithNamespace(namespace string) OptionFn
- func WithTLS(active bool) OptionFn
- func WithTimeout(timeout time.Duration) OptionFn
- type TLSConfig
- type UnexpectedResponseError
- func (e UnexpectedResponseError) Additional() error
- func (e UnexpectedResponseError) Body() string
- func (e UnexpectedResponseError) Error() string
- func (e UnexpectedResponseError) ExpectedStatuses() []int
- func (e UnexpectedResponseError) HasAdditional() bool
- func (e UnexpectedResponseError) HasBody() bool
- func (e UnexpectedResponseError) HasError() bool
- func (e UnexpectedResponseError) HasStatusCode() bool
- func (e UnexpectedResponseError) HasStatusText() bool
- func (e UnexpectedResponseError) StatusCode() int
- func (e UnexpectedResponseError) StatusText() string
- func (e UnexpectedResponseError) Unwrap() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) Node ¶
func (c *Agent) Node(ctx context.Context, req *apimodels.GetAgentNodeRequest) (*apimodels.GetAgentNodeResponse, error)
Node is used to get the agent node info.
type Auth ¶ added in v1.2.1
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) Authenticate ¶ added in v1.2.1
func (auth *Auth) Authenticate(ctx context.Context, r *apimodels.AuthnRequest) (*apimodels.AuthnResponse, error)
func (*Auth) Methods ¶ added in v1.2.1
func (auth *Auth) Methods(ctx context.Context, r *apimodels.ListAuthnMethodsRequest) (*apimodels. ListAuthnMethodsResponse, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶ added in v1.2.1
type Config struct { // Namespace is the default namespace to use for all requests. Namespace string // The optional application specific identifier appended to the User-Agent header. AppID string // HTTPClient is the client to use. Default will be used if not provided. // If set, other configuration options will be ignored, such as Timeout HTTPClient *http.Client // HTTPAuth is the auth info to use for http access. HTTPAuth *apimodels.HTTPCredential // Timeout is the timeout for requests. Timeout time.Duration // Headers is a map of headers to add to all requests. Headers http.Header // TLSConfig provides info on how we want to use TLS TLS TLSConfig }
type Jobs ¶
type Jobs struct {
// contains filtered or unexported fields
}
func (*Jobs) Executions ¶
func (j *Jobs) Executions(ctx context.Context, r *apimodels.ListJobExecutionsRequest) (*apimodels.ListJobExecutionsResponse, error)
Executions returns executions for a job.
func (*Jobs) Get ¶
func (j *Jobs) Get(ctx context.Context, r *apimodels.GetJobRequest) (*apimodels.GetJobResponse, error)
Get is used to get a job by ID.
func (*Jobs) History ¶
func (j *Jobs) History(ctx context.Context, r *apimodels.ListJobHistoryRequest) (*apimodels.ListJobHistoryResponse, error)
History returns history events for a job.
func (*Jobs) List ¶
func (j *Jobs) List(ctx context.Context, r *apimodels.ListJobsRequest) (*apimodels.ListJobsResponse, error)
List is used to list all jobs in the cluster.
func (*Jobs) Put ¶
func (j *Jobs) Put(ctx context.Context, r *apimodels.PutJobRequest) (*apimodels.PutJobResponse, error)
Put is used to submit a new job to the cluster, or update an existing job with matching ID.
func (*Jobs) Results ¶
func (j *Jobs) Results(ctx context.Context, r *apimodels.ListJobResultsRequest) (*apimodels.ListJobResultsResponse, error)
Results returns results for a job.
func (*Jobs) Stop ¶
func (j *Jobs) Stop(ctx context.Context, r *apimodels.StopJobRequest) (*apimodels.StopJobResponse, error)
Stop is used to stop a job by ID.
type Nodes ¶
type Nodes struct {
// contains filtered or unexported fields
}
func (*Nodes) Get ¶
func (c *Nodes) Get(ctx context.Context, r *apimodels.GetNodeRequest) (*apimodels.GetNodeResponse, error)
Get is used to get a node by ID.
func (*Nodes) List ¶
func (c *Nodes) List(ctx context.Context, r *apimodels.ListNodesRequest) (*apimodels.ListNodesResponse, error)
List is used to list all nodes in the cluster.
type OptionFn ¶
type OptionFn func(*Config)
OptionFn is a function that can be used to configure the client.
func WithAppID ¶
WithAppID sets the optional application specific identifier appended to the User-Agent header.
func WithCACertificate ¶ added in v1.2.1
CACert specifies the location of a CA certificate file so that it is possible to use TLS without the insecure flag when the server uses a self-signed certificate
func WithHTTPAuth ¶
func WithHTTPAuth(credential *apimodels.HTTPCredential) OptionFn
WithHTTPAuth sets the auth info to use for http access.
func WithHTTPClient ¶
WithHTTPClient sets the client to use. Default will be used if not provided. If set, other configuration options will be ignored, such as Timeout
func WithHeaders ¶
WithHeaders sets the headers to add to all requests.
func WithInsecureTLS ¶ added in v1.2.1
Insecure activates TLS but does not verify any certificate
func WithNamespace ¶
WithNamespace sets the default namespace to use for all requests.
func WithTimeout ¶
WithTimeout sets the timeout for requests.
type UnexpectedResponseError ¶
type UnexpectedResponseError struct {
// contains filtered or unexported fields
}
UnexpectedResponseError tracks the components for API errors encountered when requireOK and requireStatusIn's conditions are not met.
func (UnexpectedResponseError) Additional ¶
func (e UnexpectedResponseError) Additional() error
func (UnexpectedResponseError) Body ¶
func (e UnexpectedResponseError) Body() string
func (UnexpectedResponseError) Error ¶
func (e UnexpectedResponseError) Error() string
func (UnexpectedResponseError) ExpectedStatuses ¶
func (e UnexpectedResponseError) ExpectedStatuses() []int
func (UnexpectedResponseError) HasAdditional ¶
func (e UnexpectedResponseError) HasAdditional() bool
func (UnexpectedResponseError) HasBody ¶
func (e UnexpectedResponseError) HasBody() bool
func (UnexpectedResponseError) HasError ¶
func (e UnexpectedResponseError) HasError() bool
func (UnexpectedResponseError) HasStatusCode ¶
func (e UnexpectedResponseError) HasStatusCode() bool
func (UnexpectedResponseError) HasStatusText ¶
func (e UnexpectedResponseError) HasStatusText() bool
func (UnexpectedResponseError) StatusCode ¶
func (e UnexpectedResponseError) StatusCode() int
func (UnexpectedResponseError) StatusText ¶
func (e UnexpectedResponseError) StatusText() string
func (UnexpectedResponseError) Unwrap ¶
func (e UnexpectedResponseError) Unwrap() error