Documentation
¶
Overview ¶
Package capnpclient that wraps the capnp generated client with a POGS API
Package capnpclient that wraps the capnp generated client with a POGS API
Index ¶
- type DirectoryCursorClient
- func (cl *DirectoryCursorClient) First() (thingValue thing.ThingValue, valid bool, err error)
- func (cl *DirectoryCursorClient) Next() (thingValue thing.ThingValue, valid bool, err error)
- func (cl *DirectoryCursorClient) NextN(limit uint) (batch []thing.ThingValue, itemsRemaining bool, err error)
- func (cl *DirectoryCursorClient) Release()
- type ReadDirectoryClient
- type UpdateDirectoryClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectoryCursorClient ¶
type DirectoryCursorClient struct {
// contains filtered or unexported fields
}
DirectoryCursorClient provides iterator client for iterating the directory This implements the IDirectoryCursor interface
func NewDirectoryCursorClient ¶
func NewDirectoryCursorClient(hc *hubclient.HubClient, agentID, capID string, cursorKey string) *DirectoryCursorClient
NewDirectoryCursorClient returns a read cursor client Intended for internal use.
hc connection to the Hub agentID of the directory service capID of the read capability cursorKey is the iterator key obtain when requesting the cursor
func (*DirectoryCursorClient) First ¶
func (cl *DirectoryCursorClient) First() (thingValue thing.ThingValue, valid bool, err error)
First positions the cursor at the first key in the ordered list
func (*DirectoryCursorClient) Next ¶
func (cl *DirectoryCursorClient) Next() (thingValue thing.ThingValue, valid bool, err error)
Next moves the cursor to the next key from the current cursor
func (*DirectoryCursorClient) NextN ¶
func (cl *DirectoryCursorClient) NextN(limit uint) (batch []thing.ThingValue, itemsRemaining bool, err error)
NextN moves the cursor to the next N steps from the current cursor
func (*DirectoryCursorClient) Release ¶
func (cl *DirectoryCursorClient) Release()
Release the cursor capability
type ReadDirectoryClient ¶
type ReadDirectoryClient struct {
// contains filtered or unexported fields
}
ReadDirectoryClient is the messenger client for reading the Thing Directory This implements the IReadDirectory interface
func NewReadDirectoryClient ¶
func NewReadDirectoryClient(hc *hubclient.HubClient) *ReadDirectoryClient
NewReadDirectoryClient creates a instance of a read-directory client This connects to the service with the default directory service name.
func (*ReadDirectoryClient) GetCursor ¶
func (cl *ReadDirectoryClient) GetCursor() (directoryapi.IDirectoryCursor, error)
GetCursor returns an iterator for ThingValue objects containing TD documents
func (*ReadDirectoryClient) GetTD ¶
func (cl *ReadDirectoryClient) GetTD( agentID string, thingID string) (tv thing.ThingValue, err error)
GetTD returns a thing value containing the TD document for the given Thing address
func (*ReadDirectoryClient) GetTDs ¶
func (cl *ReadDirectoryClient) GetTDs( offset int, limit int) (tv []thing.ThingValue, err error)
GetTDs returns a batch of TD documents. The order is undefined.
type UpdateDirectoryClient ¶
type UpdateDirectoryClient struct {
// contains filtered or unexported fields
}
UpdateDirectoryClient is the client to updating a directory It can only be obtained from the DirectoryCapnpClient
func NewUpdateDirectoryClient ¶
func NewUpdateDirectoryClient(hc *hubclient.HubClient) *UpdateDirectoryClient
NewUpdateDirectoryClient returns a directory update client for the directory service. This connects to the service with the default directory service name.
func (*UpdateDirectoryClient) RemoveTD ¶
func (cl *UpdateDirectoryClient) RemoveTD(agentID, thingID string) (err error)
RemoveTD removes a TD document from the directory