operation

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package operation implements alarm modification operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// Exec modifies alarm.
	Exec(
		operation types.Operation,
		alarm *types.Alarm,
		timestamp types.CpsTime,
		role, initiator string,
	) (types.AlarmChangeType, error)
}

Executor interface is used to implement an alarm modification operation.

type ExecutorContainer

type ExecutorContainer interface {
	// Get returns executor.
	Get(operationType string) (Executor, bool)
	// Set stores executor.
	Set(operationType string, executor Executor)
	// Has returns if container contains executor.
	Has(operationType string) bool
}

ExecutorContainer interface is used to implement an storage of executors.

func NewExecutorContainer

func NewExecutorContainer() ExecutorContainer

NewExecutorContainer creates new container.

Directories

Path Synopsis
Package executor contains operation executors.
Package executor contains operation executors.

Jump to

Keyboard shortcuts

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