Documentation
¶
Index ¶
- func IsForbidden(err error) bool
- type CacheOptions
- type CachingClient
- func (c *CachingClient) GetAgentInfo(ctx context.Context, agentMeta *api.AgentMeta) (*api.AgentInfo, error)
- func (c *CachingClient) GetProjectInfo(ctx context.Context, agentMeta *api.AgentMeta, projectId string) (*api.ProjectInfo, error)
- func (c *CachingClient) Run(ctx context.Context)
- func (c *CachingClient) SendUsage(ctx context.Context, data *UsageData) error
- type Client
- type ClientError
- type ClientInterface
- type ErrorKind
- type HTTPClient
- type UsageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsForbidden ¶
Types ¶
type CacheOptions ¶
CacheOptions holds cache behaviour configuration.
type CachingClient ¶
type CachingClient struct {
// contains filtered or unexported fields
}
CachingClient wraps ClientInterface to add caching.
func NewCachingClient ¶
func NewCachingClient(client ClientInterface, agentInfoCacheOptions CacheOptions, projectInfoCacheOptions CacheOptions) *CachingClient
func (*CachingClient) GetAgentInfo ¶
func (*CachingClient) GetProjectInfo ¶
func (c *CachingClient) GetProjectInfo(ctx context.Context, agentMeta *api.AgentMeta, projectId string) (*api.ProjectInfo, error)
func (*CachingClient) Run ¶
func (c *CachingClient) Run(ctx context.Context)
type Client ¶
type Client struct { Backend *url.URL HTTPClient HTTPClient AuthSecret []byte UserAgent string }
func (*Client) GetAgentInfo ¶
func (*Client) GetProjectInfo ¶
type ClientError ¶
func (*ClientError) Error ¶
func (c *ClientError) Error() string
type ClientInterface ¶
Click to show internal directories.
Click to hide internal directories.