bad

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NilDecode = errors.New("cannot decode into a nil root struct")
)

Functions

This section is empty.

Types

type BadContext

type BadContext struct {
	Data uint32
}

func NewBadContext

func NewBadContext() *BadContext

type Context

type Context struct {
	*BadContext
	// contains filtered or unexported fields
}

Context is a context object for an incoming request. It is meant to be used inside the Scale function.

func New

func New() *Context

New creates a new empty Context

func (*Context) RuntimeContext

func (x *Context) RuntimeContext() signature.RuntimeContext

RuntimeContext converts a Context into a RuntimeContext.

type RuntimeContext

type RuntimeContext Context

func (*RuntimeContext) Error

func (x *RuntimeContext) Error(err error) []byte

Error writes the context into a byte slice and returns it

func (*RuntimeContext) Read

func (x *RuntimeContext) Read(b []byte) error

Read reads the context from the given byte slice and returns an error if one occurred

This method is meant to be used by the Scale Runtime to deserialize the Context

func (*RuntimeContext) Write

func (x *RuntimeContext) Write() []byte

Write writes the context into a byte slice and returns it

Jump to

Keyboard shortcuts

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