airlock

package
v0.0.0-...-79ef933 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client facilitates an airlock connection to an Urbit.

func NewClient

func NewClient(addr, code string) (*Client, error)

NewClient connects to the Urbit listening on the specified address.

func (*Client) Delete

func (c *Client) Delete() error

Delete deletes the airlock channel.

func (*Client) Poke

func (c *Client) Poke(ship, app, mark string, v interface{}) error

Poke sends a poke and waits for it to be acknowledged.

func (*Client) Subscribe

func (c *Client) Subscribe(ship, app, path string) (*Subscription, error)

Subscribe sets up a subscription on the specified path.

type Subscription

type Subscription struct {
	Events <-chan json.RawMessage
	// contains filtered or unexported fields
}

A Subscription is an active subscription.

func (*Subscription) Unsubscribe

func (s *Subscription) Unsubscribe() error

Unsubscribe unsubscribes from the subscription.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL