Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Close()
- func (c *Client) GetContent(ctx context.Context, request *requests.Content) (*content.SiteContent, error)
- func (c *Client) GetNodes(ctx context.Context, env *requests.Env, nodes map[string]*requests.Node) (map[string]*content.Node, error)
- func (c *Client) GetRepo(ctx context.Context) (map[string]*content.RepoNode, error)
- func (c *Client) GetURIs(ctx context.Context, dimension string, ids []string) (map[string]string, error)
- func (c *Client) Update(ctx context.Context) (*responses.Update, error)
- type HTTPTransport
- type HTTPTransportOption
- type SocketTransport
- type Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyServerURL = errors.New("empty contentserver url provided") ErrInvalidServerURL = errors.New("invalid contentserver url provided") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client a content server client
func NewHTTPClient ¶
NewHTTPClient constructs a new client to talk to the contentserver. It returns an error if the provided url is empty or invalid.
func (*Client) GetContent ¶
func (c *Client) GetContent(ctx context.Context, request *requests.Content) (*content.SiteContent, error)
GetContent request site content
func (*Client) GetNodes ¶
func (c *Client) GetNodes(ctx context.Context, env *requests.Env, nodes map[string]*requests.Node) (map[string]*content.Node, error)
GetNodes request nodes
type HTTPTransport ¶ added in v1.11.0
type HTTPTransport struct {
// contains filtered or unexported fields
}
func NewHTTPTransport ¶
func NewHTTPTransport(server string, opts ...HTTPTransportOption) *HTTPTransport
NewHTTPTransport will create a new http transport for the given server and client. Caution: the provided server url is not validated!
func (*HTTPTransport) Close ¶ added in v1.11.0
func (t *HTTPTransport) Close()
type HTTPTransportOption ¶ added in v1.11.0
type HTTPTransportOption func(*HTTPTransport)
func HTTPTransportWithHTTPClient ¶ added in v1.11.0
func HTTPTransportWithHTTPClient(v *http.Client) HTTPTransportOption
type SocketTransport ¶ added in v1.11.0
type SocketTransport struct {
// contains filtered or unexported fields
}
func NewSocketTransport ¶
func NewSocketTransport(url string, connectionPoolSize int, waitTimeout time.Duration) *SocketTransport
func (*SocketTransport) Close ¶ added in v1.11.0
func (t *SocketTransport) Close()
Click to show internal directories.
Click to hide internal directories.