Documentation
¶
Index ¶
- Constants
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (int, error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (int, error)
- type Datagram
- type Driver
- func (d *Driver) ApproveHandshake(nodeID uint32) (map[string]interface{}, error)
- func (d *Driver) Close() error
- func (d *Driver) Deregister() (map[string]interface{}, error)
- func (d *Driver) Dial(addr string) (*Conn, error)
- func (d *Driver) DialAddr(dst protocol.Addr, port uint16) (*Conn, error)
- func (d *Driver) Disconnect(connID uint32) error
- func (d *Driver) Handshake(nodeID uint32, justification string) (map[string]interface{}, error)
- func (d *Driver) Info() (map[string]interface{}, error)
- func (d *Driver) Listen(port uint16) (*Listener, error)
- func (d *Driver) PendingHandshakes() (map[string]interface{}, error)
- func (d *Driver) RecvFrom() (*Datagram, error)
- func (d *Driver) RejectHandshake(nodeID uint32, reason string) (map[string]interface{}, error)
- func (d *Driver) ResolveHostname(hostname string) (map[string]interface{}, error)
- func (d *Driver) RevokeTrust(nodeID uint32) (map[string]interface{}, error)
- func (d *Driver) SendTo(dst protocol.Addr, port uint16, data []byte) error
- func (d *Driver) SetHostname(hostname string) (map[string]interface{}, error)
- func (d *Driver) SetTags(tags []string) (map[string]interface{}, error)
- func (d *Driver) SetTaskExec(enabled bool) (map[string]interface{}, error)
- func (d *Driver) SetVisibility(public bool) (map[string]interface{}, error)
- func (d *Driver) SetWebhook(url string) (map[string]interface{}, error)
- func (d *Driver) TrustedPeers() (map[string]interface{}, error)
- type Listener
Constants ¶
const DefaultSocketPath = "/tmp/pilot.sock"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn implements net.Conn over a Pilot Protocol stream.
func (*Conn) RemoteAddr ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the main entry point for the Pilot Protocol SDK.
func (*Driver) ApproveHandshake ¶
ApproveHandshake approves a pending trust handshake request.
func (*Driver) Deregister ¶
Deregister removes the daemon from the registry.
func (*Driver) Dial ¶
Dial opens a stream connection to a remote address:port. addr format: "N:XXXX.YYYY.YYYY:PORT"
func (*Driver) Disconnect ¶
Disconnect closes a connection by ID. Used by administrative tools.
func (*Driver) PendingHandshakes ¶
PendingHandshakes returns pending trust handshake requests.
func (*Driver) RejectHandshake ¶
RejectHandshake rejects a pending trust handshake request.
func (*Driver) ResolveHostname ¶
ResolveHostname resolves a hostname to node info via the daemon.
func (*Driver) RevokeTrust ¶
RevokeTrust removes a peer from the trusted set and notifies the registry.
func (*Driver) SendTo ¶
SendTo sends an unreliable datagram to the given address:port. Use with broadcast addresses (Node=0xFFFFFFFF) to send to all network members.
func (*Driver) SetHostname ¶
SetHostname sets or clears the daemon's hostname via the registry.
func (*Driver) SetTaskExec ¶
SetTaskExec enables or disables task execution capability on the registry.
func (*Driver) SetVisibility ¶
SetVisibility sets the daemon's visibility on the registry.
func (*Driver) SetWebhook ¶
SetWebhook sets or clears the daemon's webhook URL at runtime. An empty URL disables the webhook.
func (*Driver) TrustedPeers ¶
TrustedPeers returns all trusted peers from the handshake protocol.