inout

package
v0.0.0-...-6496225 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterIn

func RegisterIn(providerType string, fn FuncNewIn)

func RegisterOut

func RegisterOut(senderType string, fn FuncNewOut)

func UnregisterIn

func UnregisterIn(providerType string)

func UnregisterOut

func UnregisterOut(senderType string)

Types

type ByteArray

type ByteArray []byte

func CloneByteArrays

func CloneByteArrays(ba []ByteArray) []ByteArray

func ToByteArray

func ToByteArray(bytes []byte) ByteArray

func (ByteArray) Clone

func (ba ByteArray) Clone() ByteArray

type FuncNewIn

type FuncNewIn func(manage InOutManager, params map[string]interface{}) InProvider

type FuncNewOut

type FuncNewOut func(manage InOutManager, params map[string]interface{}) OutSender

type IOClient

type IOClient interface {
	ID() lib.UUID
	Run()
	Enabled() bool
	GetIOType() string
	Processing() bool
	Close()
	Name() string
	SetName(name string)
	Description() string
	SetDescription(description string)
	GetParameters() map[string]interface{}
	InformStart()
	InformStop()
	InformParameters()
}

type InAndOuts

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

func NewInOutManager

func NewInOutManager(mode lib.ServiceMode, config *config.FluentConfig, logger log.Logger, quitSignal <-chan bool) *InAndOuts

func (*InAndOuts) FindInput

func (iao *InAndOuts) FindInput(id string) IOClient

func (*InAndOuts) FindOutput

func (iao *InAndOuts) FindOutput(id string) IOClient

func (*InAndOuts) GetInputs

func (iao *InAndOuts) GetInputs() []InOutInfo

func (*InAndOuts) GetInputsWithType

func (iao *InAndOuts) GetInputsWithType(typ string) []InOutInfo

func (*InAndOuts) GetOutputs

func (iao *InAndOuts) GetOutputs() []InOutInfo

func (*InAndOuts) GetOutputsWithType

func (iao *InAndOuts) GetOutputsWithType(typ string) []InOutInfo

func (*InAndOuts) Process

func (iao *InAndOuts) Process()

type InManager

type InManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewInManager

func NewInManager(config *config.FluentConfig, logger log.Logger) *InManager

func (*InManager) Close

func (m *InManager) Close()

func (*InManager) DoSleep

func (m *InManager) DoSleep() bool

func (*InManager) FindInput

func (m *InManager) FindInput(id string) IOClient

func (*InManager) FindOutput

func (m *InManager) FindOutput(id string) IOClient

func (*InManager) GetInQueue

func (m *InManager) GetInQueue() *InQueue

func (*InManager) GetInputs

func (m *InManager) GetInputs() []InOutInfo

func (*InManager) GetInputsWithType

func (m *InManager) GetInputsWithType(typ string) []InOutInfo

func (*InManager) GetLogger

func (m *InManager) GetLogger() log.Logger

func (*InManager) GetMaxMessageSize

func (m *InManager) GetMaxMessageSize() int

func (*InManager) GetOutQueue

func (m *InManager) GetOutQueue() *OutQueue

func (*InManager) GetOutputs

func (m *InManager) GetOutputs() []InOutInfo

func (*InManager) Process

func (m *InManager) Process(signal chan<- bool)

func (*InManager) Processing

func (m *InManager) Processing() bool

func (*InManager) RemoveCompleteSignal

func (m *InManager) RemoveCompleteSignal(signal chan<- bool)

func (*InManager) SignalOnComplete

func (m *InManager) SignalOnComplete(signal chan<- bool)

type InOutInfo

type InOutInfo struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	IOType      string `json:"iotype,omitempty"`
	Enabled     bool   `json:"enabled"`
	Processing  bool   `json:"processing"`
}

type InOutManager

type InOutManager interface {
	Close()
	GetLogger() log.Logger
	GetMaxMessageSize() int
	GetInQueue() *InQueue
	GetOutQueue() *OutQueue
	Process(signal chan<- bool)
	Processing() bool
	SignalOnComplete(signal chan<- bool)
	RemoveCompleteSignal(signal chan<- bool)
	FindInput(id string) IOClient
	FindOutput(id string) IOClient
	GetInputs() []InOutInfo
	GetOutputs() []InOutInfo
}

type InProvider

type InProvider interface {
	IOClient
}

type InQueue

type InQueue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewInQueue

func NewInQueue(maxCount int, maxSize uint64) *InQueue

func (*InQueue) Count

func (q *InQueue) Count() int

func (*InQueue) Pop

func (q *InQueue) Pop() (data []byte, ok bool)

func (*InQueue) Push

func (q *InQueue) Push(data []byte)

type OutManager

type OutManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewOutManager

func NewOutManager(config *config.FluentConfig, logger log.Logger) *OutManager

func (*OutManager) Close

func (m *OutManager) Close()

func (*OutManager) DoSleep

func (m *OutManager) DoSleep(lastSleepTime time.Time) bool

func (*OutManager) FindInput

func (m *OutManager) FindInput(id string) IOClient

func (*OutManager) FindOutput

func (m *OutManager) FindOutput(id string) IOClient

func (*OutManager) GetInQueue

func (m *OutManager) GetInQueue() *InQueue

func (*OutManager) GetInputs

func (m *OutManager) GetInputs() []InOutInfo

func (*OutManager) GetLogger

func (m *OutManager) GetLogger() log.Logger

func (*OutManager) GetMaxMessageSize

func (m *OutManager) GetMaxMessageSize() int

func (*OutManager) GetOutQueue

func (m *OutManager) GetOutQueue() *OutQueue

func (*OutManager) GetOutputs

func (m *OutManager) GetOutputs() []InOutInfo

func (*OutManager) GetOutputsWithType

func (m *OutManager) GetOutputsWithType(typ string) []InOutInfo

func (*OutManager) Process

func (m *OutManager) Process(signal chan<- bool)

func (*OutManager) Processing

func (m *OutManager) Processing() bool

func (*OutManager) RemoveCompleteSignal

func (m *OutManager) RemoveCompleteSignal(signal chan<- bool)

func (*OutManager) SignalOnComplete

func (m *OutManager) SignalOnComplete(signal chan<- bool)

type OutQueue

type OutQueue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewOutQueue

func NewOutQueue(chunkSize, maxCount int, waitPopForMillisec time.Duration) *OutQueue

func (*OutQueue) CanPop

func (q *OutQueue) CanPop() bool

func (*OutQueue) CanPush

func (q *OutQueue) CanPush() bool

func (*OutQueue) ChunkSize

func (q *OutQueue) ChunkSize() int

func (*OutQueue) Count

func (q *OutQueue) Count() int

func (*OutQueue) NodeCount

func (q *OutQueue) NodeCount() int

func (*OutQueue) Pop

func (q *OutQueue) Pop(force bool) (chunk []ByteArray, ok bool)

func (*OutQueue) Push

func (q *OutQueue) Push(data string)

type OutSender

type OutSender interface {
	IOClient
	Send(messages []ByteArray)
}

Jump to

Keyboard shortcuts

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