message

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildFunc

type BuildFunc func() Instance

BuildFunc creates empty messages of a given type

func (BuildFunc) Build

func (fn BuildFunc) Build() Instance

type Builder

type Builder interface {
	Build() Instance
}

Creates an empty instance of this type

type Field

type Field string

Field specifies the name of a field in a message in the pipeline.

func (Field) IsUnspecified

func (m Field) IsUnspecified() bool

IsUnspecified reports whether this field is "".

type Instance

type Instance interface {
	// Set updates the value of a given field.
	Set(Field, Instance) error
	// Get returns the current value of a field.
	Get(Field) (Instance, error)
}

Instance specifies an interface for concrete messages. These messages can be sent and received in stages. An instance can have subfields, that can be updated.

type Type

type Type interface {
	Builder
	// Subfield returns the Type of a subfield.
	Subfield(Field) (Type, error)
	// Verifies whether these types are comparible.
	Compatible(Type) bool
}

Type describes the underlying struct of Message.

Jump to

Keyboard shortcuts

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