meta

package
v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetaBlob

func IsMetaBlob(blob []byte) (string, []byte, bool)

IsMetaBlob returns true if the blob is "mata blob" (an encoded internal piece of data. It returns the meta type as a string, and the blob if the blob is an actual meta blob.

Types

type Meta

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

Meta holds the meta manager

func New

func New(logger log.Logger, chub *hub.Hub) (*Meta, error)

New initializes a meta manager

func (*Meta) Build

func (m *Meta) Build(data MetaData) (*blob.Blob, error)

Build convert the MetaData into a blo

func (*Meta) RegisterApplyFunc

func (m *Meta) RegisterApplyFunc(t string, f func(string, []byte) error)

RegisterApplyFunc registers a callback func for the given meta type

func (*Meta) Scan

func (m *Meta) Scan() error

Scan does nothing for the moment

type MetaData

type MetaData interface {
	Type() string
	Dump() ([]byte, error)
}

MetaData is the interface that must be implemented by the different meta data types

Jump to

Keyboard shortcuts

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