boot

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MPL-2.0 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 {
	Exchanged func(name string)
	Complete  func()
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string, config *daemon.Config, token Token) *Client

func (*Client) Run

func (cl *Client) Run(ctx context.Context, retry time.Duration)

type Envelope

type Envelope struct {
	Name   string
	Config []byte
}

func (*Envelope) Open

func (env *Envelope) Open(t Token, data []byte) error

func (*Envelope) Seal

func (env *Envelope) Seal(t Token) ([]byte, error)

type Server

type Server struct {
	Joined func(info Envelope) // hook to handle arrived join request, executed after response
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config *daemon.Config, token Token) *Server

func (*Server) ServeHTTP

func (srv *Server) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type Token

type Token string

func (Token) Decrypt

func (t Token) Decrypt(data []byte) ([]byte, error)

func (Token) Encrypt

func (t Token) Encrypt(data []byte) []byte

Jump to

Keyboard shortcuts

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