Documentation
¶
Overview ¶
Package client provides a bounded, authenticated HTTP client for Questlock. Publish never automatically retries. To retry after an uncertain response, reuse the exact same request and operation ID so the server can replay it.
Index ¶
- Constants
- type Client
- func (c *Client) Audit(ctx context.Context, limit int) ([]protocol.AuditEvent, error)
- func (c *Client) Get(ctx context.Context, key string) (protocol.Artifact, error)
- func (c *Client) List(ctx context.Context) ([]protocol.Artifact, error)
- func (c *Client) Publish(ctx context.Context, request protocol.PublishRequest) (protocol.PublishResult, error)
- type Error
Constants ¶
View Source
const ( DefaultTimeout = 15 * time.Second MaxResponseBytes = 16 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client may be shared by concurrent goroutines. Its credentials are sent only to the configured server; redirects are rejected.
func New ¶
New creates a client with a 15-second request timeout and 16MiB response limit. Plain HTTP is accepted only for literal loopback IP addresses. All other hosts require HTTPS. Environment proxy settings are deliberately ignored.
func (*Client) Publish ¶
func (c *Client) Publish(ctx context.Context, request protocol.PublishRequest) (protocol.PublishResult, error)
Click to show internal directories.
Click to hide internal directories.