batch_processor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE_PORT              = "create-port"
	CREATE_PORT_PERMANENT    = "create-port-permanent"
	REMOVE_PORT              = "remove-port"
	CREATE_PROTOCOL          = "create-protocol"
	REMOVE_PROTOCOL          = "remove-protocol"
	CREATE_RICH              = "create-richRule"
	CREATE_FORWARD           = "create-forward"
	CREATE_SERVICE           = "create-service"
	CREATE_SERVICE_PERMANENT = "create-service-permanent"
	ENABLE_MASQUERADE        = "enable-masquerade"
	DISABLE_MASQUERADE       = "disable-masquerade"
	RELOAD_FIREWALD          = "reload"
	FLUSH_SETTING            = "flush"
	SET_DEFAULT_ZONE         = "set-default-zone"
	DiscoverHost             = "discover_host"
)

Variables

View Source
var Store map[string]interface{}
View Source
var T = time.Second * 5

Functions

func RandName

func RandName() string

func StoreAdd

func StoreAdd(key string, v interface{})

func StoreDel

func StoreDel(key string)

Types

type Event

type Event struct {
	EventName string
	Host      string
	TaskName  string
	Task      interface{}
	// contains filtered or unexported fields
}

type Processor

type Processor struct {
	// contains filtered or unexported fields
}
var P *Processor

func NewProcessor

func NewProcessor() *Processor

func (*Processor) Add

func (p *Processor) Add(notification string, event interface{})

func (*Processor) AddAfter

func (p *Processor) AddAfter(notification string, t time.Duration, event interface{})

func (*Processor) Run

func (p *Processor) Run()

Jump to

Keyboard shortcuts

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