Documentation ¶
Index ¶
- func WithAuthorization(s string) funcopt.O
- func WithBearer(s string) funcopt.O
- func WithCertificate(s string) funcopt.O
- func WithInsecureSkipVerify(v bool) funcopt.O
- func WithKey(s string) funcopt.O
- func WithPassword(s string) funcopt.O
- func WithRootCa(s string) funcopt.O
- func WithTimeout(v time.Duration) funcopt.O
- func WithURL(url string) funcopt.O
- func WithUsername(s string) funcopt.O
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAuthorization ¶
WithAuthorization sets the client authorization to use for newRequests
func WithBearer ¶
WithBearer sets the client bearer token to use for newRequests
func WithCertificate ¶
WithCertificate sets the x509 client certificate.
func WithInsecureSkipVerify ¶
WithInsecureSkipVerify skips certificate validity checks.
func WithPassword ¶
WithPassword sets the password to use for login.
func WithRootCa ¶
WithRootCa sets the client RootCA filename, httpclient cache don't cache clients with RootCa because of possible tmp filename conflict signature. The cert from s file is appended to x509.SystemCertPool
func WithTimeout ¶
WithTimeout set a timeout on the connection
func WithURL ¶
WithURL is the option pointing the api location and protocol using the [<scheme>://]<addr>[:<port>] format.
Supported schemes:
- https http/2 with TLS
- tls http/2 with TLS
If unset, a unix domain socket connection and the http/2 protocol is selected.
If WithURL is a unix domain socket path, use the corresponding protocol.
If scheme is omitted, select the http/2 protocol.
Examples: * /var/lib/opensvc/lsnr/http.sock * https://acme.com:1215
func WithUsername ¶
WithUsername sets the username to use for login.
Types ¶
type T ¶
type T struct { *oapi.ClientWithResponses // contains filtered or unexported fields }
T is the agent api client configuration
func New ¶
New allocates a new client configuration and returns the reference so users are not tempted to use client.Config{} dereferenced, which would make loadContext useless.
func (*T) NewGetDaemonStatus ¶
func (t *T) NewGetDaemonStatus() *api.GetDaemonStatus