Documentation ¶
Index ¶
- func Backends(id ...string) string
- func Commands(id ...string) string
- func ErrRequestFailed(res *http.Response) api.ServerError
- func Frontends(id ...string) string
- func Meetings(id ...string) string
- func Resource(res string, id []string) string
- type Client
- func (c *Client) AgentBackendRetrieve(ctx context.Context) (*store.BackendState, error)
- func (c *Client) AgentHeartbeatCreate(ctx context.Context) (*store.AgentHeartbeat, error)
- func (c *Client) AgentRPC(ctx context.Context, req *api.RPCRequest) (api.RPCResult, error)
- func (c *Client) AuthorizeRequest(req *http.Request) *http.Request
- func (c *Client) BackendCreate(ctx context.Context, backend *store.BackendState) (*store.BackendState, error)
- func (c *Client) BackendDelete(ctx context.Context, backend *store.BackendState, opts ...url.Values) (*store.BackendState, error)
- func (c *Client) BackendMeetingsEnd(ctx context.Context, backendID string) (*store.Command, error)
- func (c *Client) BackendMeetingsList(ctx context.Context, backendID string, query ...url.Values) ([]*store.MeetingState, error)
- func (c *Client) BackendRetrieve(ctx context.Context, id string) (*store.BackendState, error)
- func (c *Client) BackendUpdate(ctx context.Context, backend *store.BackendState) (*store.BackendState, error)
- func (c *Client) BackendUpdateRaw(ctx context.Context, id string, payload []byte) (*store.BackendState, error)
- func (c *Client) BackendsList(ctx context.Context, query ...url.Values) ([]*store.BackendState, error)
- func (c *Client) CommandCreate(ctx context.Context, cmd *store.Command) (*store.Command, error)
- func (c *Client) CommandRetrieve(ctx context.Context, id string) (*store.Command, error)
- func (c *Client) CtrlMigrate(ctx context.Context) (*schema.Status, error)
- func (c *Client) FrontendCreate(ctx context.Context, frontend *store.FrontendState) (*store.FrontendState, error)
- func (c *Client) FrontendDelete(ctx context.Context, frontend *store.FrontendState) (*store.FrontendState, error)
- func (c *Client) FrontendRetrieve(ctx context.Context, id string) (*store.FrontendState, error)
- func (c *Client) FrontendUpdate(ctx context.Context, frontend *store.FrontendState) (*store.FrontendState, error)
- func (c *Client) FrontendUpdateRaw(ctx context.Context, id string, payload []byte) (*store.FrontendState, error)
- func (c *Client) FrontendsList(ctx context.Context, query ...url.Values) ([]*store.FrontendState, error)
- func (c *Client) MeetingDelete(ctx context.Context, id string) (*store.MeetingState, error)
- func (c *Client) MeetingRetrieve(ctx context.Context, id string) (*store.MeetingState, error)
- func (c *Client) MeetingUpdate(ctx context.Context, meeting *store.MeetingState) (*store.MeetingState, error)
- func (c *Client) MeetingUpdateRaw(ctx context.Context, id string, payload []byte) (*store.MeetingState, error)
- func (c *Client) MeetingsList(ctx context.Context, query ...url.Values) ([]*store.MeetingState, error)
- func (c *Client) Request(ctx context.Context, req *Request) (*Response, error)
- func (c *Client) Status(ctx context.Context) (*api.StatusResponse, error)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrRequestFailed ¶
func ErrRequestFailed(res *http.Response) api.ServerError
ErrRequestFailed creates an APIError from the HTTP response.
Types ¶
type Client ¶
Client implements the default client for v1
func (*Client) AgentBackendRetrieve ¶
AgentBackendRetrieve fetches the currently registered backend
func (*Client) AgentHeartbeatCreate ¶
AgentHeartbeatCreate creates a heartbeat for a backend
func (*Client) AuthorizeRequest ¶
AuthorizeRequest will add a http Authorization header with the access token to the request
func (*Client) BackendCreate ¶
func (c *Client) BackendCreate( ctx context.Context, backend *store.BackendState, ) (*store.BackendState, error)
BackendCreate creates a new backend on the server
func (*Client) BackendDelete ¶
func (c *Client) BackendDelete( ctx context.Context, backend *store.BackendState, opts ...url.Values, ) (*store.BackendState, error)
BackendDelete removes a backend from the cluster
func (*Client) BackendMeetingsEnd ¶
func (c *Client) BackendMeetingsEnd( ctx context.Context, backendID string, ) (*store.Command, error)
BackendMeetingsEnd ends all meetings on a given backend
func (*Client) BackendMeetingsList ¶
func (c *Client) BackendMeetingsList( ctx context.Context, backendID string, query ...url.Values, ) ([]*store.MeetingState, error)
BackendMeetingsList retrieves all meetings for a given backend
func (*Client) BackendRetrieve ¶
BackendRetrieve retrieves a single backend by ID.
func (*Client) BackendUpdate ¶
func (c *Client) BackendUpdate( ctx context.Context, backend *store.BackendState, ) (*store.BackendState, error)
BackendUpdate updates the backend
func (*Client) BackendUpdateRaw ¶
func (c *Client) BackendUpdateRaw( ctx context.Context, id string, payload []byte, ) (*store.BackendState, error)
BackendUpdateRaw updates an existing backend identified by ID with a raw JSON payload.
func (*Client) BackendsList ¶
func (c *Client) BackendsList( ctx context.Context, query ...url.Values, ) ([]*store.BackendState, error)
BackendsList retrievs a list of backends from the server
func (*Client) CommandCreate ¶
CommandCreate enqueues a command into the cluster's command queue.
func (*Client) CommandRetrieve ¶
CommandRetrieve gets a single command by ID. Usefull for state polling.
func (*Client) CtrlMigrate ¶
CtrlMigrate applies all pending migrations
func (*Client) FrontendCreate ¶
func (c *Client) FrontendCreate( ctx context.Context, frontend *store.FrontendState, ) (*store.FrontendState, error)
FrontendCreate POSTs a new frontend to the server
func (*Client) FrontendDelete ¶
func (c *Client) FrontendDelete( ctx context.Context, frontend *store.FrontendState, ) (*store.FrontendState, error)
FrontendDelete removes a frontend from the cluster.
func (*Client) FrontendRetrieve ¶
FrontendRetrieve retrieves a single frontend
func (*Client) FrontendUpdate ¶
func (c *Client) FrontendUpdate( ctx context.Context, frontend *store.FrontendState, ) (*store.FrontendState, error)
FrontendUpdate PATCHes an already existing frontend.
func (*Client) FrontendUpdateRaw ¶
func (c *Client) FrontendUpdateRaw( ctx context.Context, id string, payload []byte, ) (*store.FrontendState, error)
FrontendUpdateRaw PATCHes an already existing frontend identified by ID using raw payload.
func (*Client) FrontendsList ¶
func (c *Client) FrontendsList( ctx context.Context, query ...url.Values, ) ([]*store.FrontendState, error)
FrontendsList retrievs a list of frontends
func (*Client) MeetingDelete ¶
MeetingDelete will remove a meeting from the store
func (*Client) MeetingRetrieve ¶
MeetingRetrieve will fetch a single meeting by ID
func (*Client) MeetingUpdate ¶
func (c *Client) MeetingUpdate( ctx context.Context, meeting *store.MeetingState, ) (*store.MeetingState, error)
MeetingUpdate will invoke a patch for an entire meeting
func (*Client) MeetingUpdateRaw ¶
func (c *Client) MeetingUpdateRaw( ctx context.Context, id string, payload []byte, ) (*store.MeetingState, error)
MeetingUpdateRaw will perform a PATCH on a meeting
func (*Client) MeetingsList ¶
func (c *Client) MeetingsList( ctx context.Context, query ...url.Values, ) ([]*store.MeetingState, error)
MeetingsList retrieves all meetings. Warning: Some scope is required otherwise the request will fail.