ont

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(d coding.Codec) (s *splice.Splice)

Encode is the generic encoder for an onion, all onions can be encoded with it.

Types

type Ngin

type Ngin interface {
	HandleMessage(s *splice.Splice, pr Onion)
	GetLoad() byte
	SetLoad(byte)
	Mgr() *sess.Manager
	Pending() *responses.Pending
	GetHidden() *hidden.Hidden
	WaitForShutdown() <-chan struct{}
	Keyset() *crypto.KeySet
}

Ngin is the generic interface for onion encoders to access the engine without tying the dependencies together.

type Onion

type Onion interface {
	coding.Codec
	Wrap(inner Onion)
	Handle(s *splice.Splice, p Onion, ni Ngin) (e error)
	Account(res *sess.Data, sm *sess.Manager, s *sessions.Data,
		last bool) (skip bool, sd *sessions.Data)
}

Onion are messages that can be layered over each other and have a set of processing instructions for the data in them, and, if relevant, how to account for them in sessions.

func Assemble

func Assemble(o []Onion) (on Onion)

Assemble takes a slice and inserts the tail into the onion of the head until there is no tail left.

Jump to

Keyboard shortcuts

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