Documentation ¶
Overview ¶
Package cborplugin is a plugin system allowing mix network services to be added in any language. It communicates queries and responses to and from the mix server using CBOR over HTTP over UNIX domain socket. Beyond that, a client supplied SURB is used to route the response back to the client as described in our Kaetzchen specification document:
https://github.com/katzenpost/docs/blob/master/specs/kaetzchen.rst
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client acts as a client interacting with one or more plugins. The Client type is composite with Worker and therefore has a Halt method. Client implements this interface and proxies data between this mix server and the external plugin program.
func New ¶
New creates a new plugin client instance which represents the single execution of the external plugin program.
func (*Client) Capability ¶
Capability are used in Mix Descriptor publication to give service clients more information about the service. Not plugins will need to use this feature.
func (*Client) GetParameters ¶
func (c *Client) GetParameters() *Parameters
GetParameters are used in Mix Descriptor publication to give service clients more information about the service. Not plugins will need to use this feature.
type Parameters ¶
Parameters is an optional mapping that plugins can publish, these get advertised to clients in the MixDescriptor. The output of GetParameters() ends up being published in a map associating with the service names to service parameters map. This information is part of the Mix Descriptor which is defined here: https://github.com/katzenpost/core/blob/master/pki/pki.go
type Response ¶
type Response struct {
Payload []byte
}
Response is the response received after sending a Request to the plugin.
type ServicePlugin ¶
type ServicePlugin interface { // OnRequest is the method that is called when the Provider receives // a request designed for a particular agent. The caller will handle // extracting the payload component of the message OnRequest(request *Request) ([]byte, error) // Capability returns the agent's functionality for publication in // the Provider's descriptor. Capability() string // Parameters returns the agent's paramenters for publication in // the Provider's descriptor. GetParameters() *Parameters // Halt stops the plugin. Halt() }
ServicePlugin is the interface that we expose for external plugins to implement. This is similar to the internal Kaetzchen interface defined in: github.com/hashcloak/Meson/server/internal/provider/kaetzchen/kaetzchen.go