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 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/katzenpost/blob/master/docs/specs/kaetzchen.rst
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(logBackend *log.Backend, capability, endpoint string, commandBuilder CommandBuilder) *Client
func (*Client) Capability ¶
func (*Client) GetParameters ¶
type ClientPlugin ¶
type CommandBuilder ¶
type CommandBuilder interface {
Build() Command
}
type CommandIO ¶
func NewCommandIO ¶
func NewCommandIO(log *logging.Logger) *CommandIO
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/katzenpost/blob/master/core/pki/pki.go
type RequestFactory ¶
type RequestFactory struct { }
RequestFactory is a CommandBuilder for Requests
type Response ¶
type Response struct {
Payload []byte
}
Response is the response received after sending a Request to the plugin.
type ResponseFactory ¶
type ResponseFactory struct { }
ResponseFactory is a CommandBuilder for Responses
type Server ¶
Server is used to construct plugins, which are programs which listen on a unix domain socket for connections from the Provider/mix server.
func NewServer ¶
func NewServer(log *logging.Logger, socketFile string, commandBuilder CommandBuilder, plugin ServerPlugin) *Server
type ServerPlugin ¶
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/katzenpost/katzenpost/server/internal/provider/kaetzchen/kaetzchen.go