parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: GPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(log *logrus.Entry)

Types

type ChannelGroup

type ChannelGroup struct {
	ReadCh  []<-chan Message
	WriteCh []chan<- Message
}

type ControlPlane

type ControlPlane struct {
	Fs    []func()
	Entry []chan<- Message
	Exit  []<-chan Message
}

type Message

type Message struct {
	Status Status `json:"status"`
	Data   string `json:"data"`
}

func NewMessage

func NewMessage(health bool, data string) *Message

func (*Message) DeepMergeInto

func (in *Message) DeepMergeInto(out *Message)

func (Message) Marshal

func (m Message) Marshal() ([]byte, error)

func (Message) Unmarshal

func (m Message) Unmarshal() (interface{}, error)

type Parser

type Parser interface {
	Parse(*dag.DAG) ControlPlane
}

type SimpleParser

type SimpleParser struct {
	ChanGroup map[string]*ChannelGroup
}

func NewSimpleParser

func NewSimpleParser() *SimpleParser

func (*SimpleParser) Init

func (s *SimpleParser) Init(d *dag.DAG)

func (*SimpleParser) Parse

func (s *SimpleParser) Parse(d *dag.DAG) ControlPlane

type Status

type Status struct {
	Health bool
}

TODO: Define Status

Jump to

Keyboard shortcuts

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