middleware

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyRawMessage = iota
)

Variables

This section is empty.

Functions

func NewCodec

func NewCodec(rootContext context.Context, userCodec laminar.MiddlewareEnablingCodec,
	opts ...CodecOption) goka.Codec

Types

type Codec

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

func (*Codec) Decode

func (i *Codec) Decode(data []byte) (interface{}, error)

func (*Codec) Encode

func (i *Codec) Encode(valueIface interface{}) ([]byte, error)

type CodecOption

type CodecOption func(i *Codec)

func WithCodecAfterEncodeFunc

func WithCodecAfterEncodeFunc(after laminar.CodecAfterEncodeFunc) CodecOption

func WithCodecBeforeDecodeFunc

func WithCodecBeforeDecodeFunc(before laminar.CodecBeforeDecodeFunc) CodecOption

type Context

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

func NewMiddlewareContext

func NewMiddlewareContext(gCtx goka.Context, rawMessage []byte) *Context

func (*Context) Context

func (ec *Context) Context() context.Context

func (*Context) Delete

func (ec *Context) Delete()

func (*Context) Emit

func (ec *Context) Emit(topic goka.Stream, key string, value interface{})

func (*Context) Fail

func (ec *Context) Fail(err error)

func (*Context) Join

func (ec *Context) Join(topic goka.Table) interface{}

func (*Context) Key

func (ec *Context) Key() string

func (*Context) Lookup

func (ec *Context) Lookup(topic goka.Table, key string) interface{}

func (*Context) Loopback

func (ec *Context) Loopback(key string, value interface{})

func (*Context) Offset

func (ec *Context) Offset() int64

func (*Context) Partition

func (ec *Context) Partition() int32

func (*Context) RawMessage

func (ec *Context) RawMessage() []byte

func (*Context) SetValue

func (ec *Context) SetValue(value interface{})

func (*Context) Timestamp

func (ec *Context) Timestamp() time.Time

func (*Context) Topic

func (ec *Context) Topic() goka.Stream

func (*Context) Value

func (ec *Context) Value() interface{}

type ProcessingHandler

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

func (*ProcessingHandler) ProcessCallback

func (ph *ProcessingHandler) ProcessCallback() goka.ProcessCallback

Jump to

Keyboard shortcuts

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