wire

package
v0.0.0-...-d5de3f3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkCommand

func WalkCommand(bytes []byte, fn func(i int, op Operation) (bool, error)) error

WalkCommand will walk the encoded command and yield the operations. ErrBreak may be returned to stop execution.

Types

type Command

type Command struct {
	Operations []Operation
}

Command represents a list of operations.

func (*Command) Decode

func (c *Command) Decode(bytes []byte, clone bool) error

Decode will decode the command.

func (*Command) Encode

func (c *Command) Encode(borrow bool) ([]byte, fpack.Ref, error)

Encode will encode the command.

type Operation

type Operation struct {
	Name string
	Code []byte
}

Operation represents an encoded instruction.

Jump to

Keyboard shortcuts

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