Documentation ¶
Index ¶
- func NewSessionInfo(timeout time.Duration, session *data.Session, mapRule map[string]Rule) *data.Info
- type ConfigEngine
- type ConfigLog
- type DipperEngine
- func (d *DipperEngine) Add(ctx context.Context, sessionData *data.Session) error
- func (d *DipperEngine) AddRule(rules ...Rule)
- func (d *DipperEngine) ControlGetRule(session uint64) []string
- func (d *DipperEngine) ControlSession(ruleName string) []uint64
- func (d *DipperEngine) ControlStopSession(ruleName string, session uint64)
- func (d *DipperEngine) ListControl() []string
- func (d *DipperEngine) LoadPlugin()
- func (d *DipperEngine) OutputSubscribe(ctx context.Context, callback queue.SubscribeFunction[*data.ResultSession])
- func (d *DipperEngine) RuleEnable() []string
- func (d *DipperEngine) SessionInputQueue(factoryQueueName FactoryQueueName[*data.Session])
- func (d *DipperEngine) SessionOutputQueue(factoryQueueOutputName FactoryQueueName[*data.ResultSession])
- func (d *DipperEngine) SetConfig(conf *ConfigEngine)
- func (d *DipperEngine) SetContext(ctx context.Context)
- func (d *DipperEngine) Start() error
- func (d *DipperEngine) StartSession(ctx context.Context, sessionId uint64) error
- func (d *DipperEngine) Stop() error
- type FactoryQueue
- type FactoryQueueName
- type PluginDipper
- type Rule
- type RuleOption
- type SessionControl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigEngine ¶
type DipperEngine ¶
type DipperEngine struct {
// contains filtered or unexported fields
}
func NewDipperEngine ¶
func NewDipperEngine( config *ConfigEngine, factoryQueue FactoryQueue[*data.InputEngine], factoryQueueOutput FactoryQueueName[*data.OutputEngine], store store.Store, bus bus2.Bus, ) *DipperEngine
func (*DipperEngine) AddRule ¶
func (d *DipperEngine) AddRule(rules ...Rule)
func (*DipperEngine) ControlGetRule ¶ added in v0.0.4
func (d *DipperEngine) ControlGetRule(session uint64) []string
func (*DipperEngine) ControlSession ¶ added in v0.0.4
func (d *DipperEngine) ControlSession(ruleName string) []uint64
func (*DipperEngine) ControlStopSession ¶ added in v0.0.4
func (d *DipperEngine) ControlStopSession(ruleName string, session uint64)
func (*DipperEngine) ListControl ¶ added in v0.0.4
func (d *DipperEngine) ListControl() []string
func (*DipperEngine) LoadPlugin ¶
func (d *DipperEngine) LoadPlugin()
func (*DipperEngine) OutputSubscribe ¶ added in v0.0.6
func (d *DipperEngine) OutputSubscribe(ctx context.Context, callback queue.SubscribeFunction[*data.ResultSession])
func (*DipperEngine) RuleEnable ¶
func (d *DipperEngine) RuleEnable() []string
func (*DipperEngine) SessionInputQueue ¶
func (d *DipperEngine) SessionInputQueue(factoryQueueName FactoryQueueName[*data.Session])
func (*DipperEngine) SessionOutputQueue ¶
func (d *DipperEngine) SessionOutputQueue(factoryQueueOutputName FactoryQueueName[*data.ResultSession])
func (*DipperEngine) SetConfig ¶
func (d *DipperEngine) SetConfig(conf *ConfigEngine)
func (*DipperEngine) SetContext ¶
func (d *DipperEngine) SetContext(ctx context.Context)
func (*DipperEngine) Start ¶
func (d *DipperEngine) Start() error
func (*DipperEngine) StartSession ¶ added in v0.0.4
func (d *DipperEngine) StartSession(ctx context.Context, sessionId uint64) error
func (*DipperEngine) Stop ¶
func (d *DipperEngine) Stop() error
type FactoryQueue ¶
type FactoryQueue[T any] func(engine Rule) queue.QueueEngine[T]
func FactoryQueueDefault ¶
func FactoryQueueDefault[T any]() FactoryQueue[T]
type FactoryQueueName ¶
type FactoryQueueName[T any] func(name string) queue.QueueEngine[T]
func FactoryQueueNameDefault ¶
func FactoryQueueNameDefault[T any]() FactoryQueueName[T]
type PluginDipper ¶
type PluginDipper interface {
Rules() []Rule
}
type Rule ¶
type Rule interface { Id() string Infinity() bool Initialize(ctx context.Context, option map[string]interface{}) error Run(ctx context.Context, subscribeQueueInput func(ctx context.Context, callback queue.SubscribeFunction[*data.InputEngine]) error, pushQueueOutput func(ctx context.Context, input *data.OutputEngine) error) Stop(ctx context.Context) error }
type RuleOption ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.