client

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: LGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPTransport

func NewHTTPTransport(server string, client *http.Client) transport

func NewSocketTransport

func NewSocketTransport(server string, connectionPoolSize int, waitTimeout time.Duration) transport

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client a content server client

func NewClient

func NewClient(
	server string,
	connectionPoolSize int,
	waitTimeout time.Duration,
) (c *Client, err error)

func NewClientWithTransport

func NewClientWithTransport(
	transport transport,
) (c *Client, err error)

func NewHTTPClient

func NewHTTPClient(server string) (c *Client, err error)

func NewHTTPClientWithTransport

func NewHTTPClientWithTransport(transport transport) (c *Client, err error)

func (*Client) GetContent

func (c *Client) GetContent(request *requests.Content) (*content.SiteContent, error)

GetContent request site content

func (*Client) GetNodes

func (c *Client) GetNodes(env *requests.Env, nodes map[string]*requests.Node) (map[string]*content.Node, error)

GetNodes request nodes

func (*Client) GetRepo

func (c *Client) GetRepo() (map[string]*content.RepoNode, error)

GetRepo get the whole repo

func (*Client) GetURIs

func (c *Client) GetURIs(dimension string, IDs []string) (map[string]string, error)

GetURIs resolve uris for ids in a dimension

func (*Client) ShutDown

func (c *Client) ShutDown()

func (*Client) Update

func (c *Client) Update() (*responses.Update, error)

Update tell the server to update itself

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL