bund

package
v0.0.0-...-7f366ee Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const MAXPIPECAP = 1000000

Variables

View Source
var ApplicationId string
View Source
var ApplicationType string
View Source
var Conf cmap.Cmap
View Source
var DoContinue bool
View Source
var Etcd *clientv3.Client
View Source
var EvtQueueName string
View Source
var HadSync bool
View Source
var LogQueueName string
View Source
var MetricQueueName string
View Source
var NRAPI *nrapi.NRAPI
View Source
var (
	NRQL_PROMPT = "[ NRQL ] "
)
View Source
var Nats *nats.Conn
View Source
var NatsCluster string
View Source
var NewRelicConfigured bool
View Source
var (
	PROMPT = "[ MBUND ] "
)
View Source
var PrometheusConfigured bool
View Source
var QueueName string
View Source
var StorageConfigured bool
View Source
var StoragePipe chan *gabs.Container
View Source
var SysQueueName string
View Source
var TraceQueueName string
View Source
var ZabbixConfigured bool

Functions

func AddShellCommand

func AddShellCommand(name string, fun ShellCommand)

func Agent

func Agent()

func Agitator

func Agitator()

func AgitatorScheduleConfig

func AgitatorScheduleConfig()

func AttrsToQueue

func AttrsToQueue(attrs []string) *deque.Deque

func BUNDGetFromDictOrContext

func BUNDGetFromDictOrContext(l *tc.TCExecListener, d *tc.TCDict, key string) interface{}

func BUNDGetStringFromDictOrContext

func BUNDGetStringFromDictOrContext(l *tc.TCExecListener, d *tc.TCDict, key string) string

func BUNDLoadStorage

func BUNDLoadStorage(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsExecScript

func BUNDNatsExecScript(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSchedule

func BUNDNatsSchedule(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSendEvent

func BUNDNatsSendEvent(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSendLog

func BUNDNatsSendLog(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSendMetric

func BUNDNatsSendMetric(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSendMsg

func BUNDNatsSendMsg(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNatsSendSync

func BUNDNatsSendSync(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDNewrelicQuery

func BUNDNewrelicQuery(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDPrometheusQuery

func BUNDPrometheusQuery(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDQueryStorage

func BUNDQueryStorage(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDSampleStorage

func BUNDSampleStorage(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDSendStop

func BUNDSendStop(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BUNDSetLocalConf

func BUNDSetLocalConf(l *tc.TCExecListener, name string, q *deque.Deque) (interface{}, error)

func BundEvalExpression

func BundEvalExpression(code string)

func BundGlobalEvalExpression

func BundGlobalEvalExpression(code string, args []string, res map[string]interface{})

func CloseEtcdAgent

func CloseEtcdAgent()

func CloseInternalStorage

func CloseInternalStorage()

func CloseNatsAgent

func CloseNatsAgent()

func Config

func Config()

func DisplayEtcdConfig

func DisplayEtcdConfig()

func EtcdDelItems

func EtcdDelItems()

func EtcdGetConfItems

func EtcdGetConfItems()

func EtcdGetItems

func EtcdGetItems() *map[string]string

func EtcdReturnConfItems

func EtcdReturnConfItems() *map[string]string

func EtcdSetConfItem

func EtcdSetConfItem(key string, value string)

func EtcdSetItem

func EtcdSetItem(key string, value string)

func Eval

func Eval()

func EvalDisplayResult

func EvalDisplayResult(core *stdlib.BUNDEnv)

func Fin

func Fin()

func HJsonLoadConfig

func HJsonLoadConfig(uri string) *map[string]interface{}

func IfMSG

func IfMSG(msg *NRBundPacket) bool

func IfSTOP

func IfSTOP(msg *NRBundPacket) bool

func IfSYNC

func IfSYNC(msg *NRBundPacket) bool

func Init

func Init()

func InitEtcdAgent

func InitEtcdAgent(otype string)

func InitInternalStorage

func InitInternalStorage()

func InitNatsAgent

func InitNatsAgent()

func InitNewRelicAgent

func InitNewRelicAgent() bool

func InitPrometheusAgent

func InitPrometheusAgent() bool

func InitStoragePipe

func InitStoragePipe()

func InitZabbixAgent

func InitZabbixAgent() bool

func IsShellCommand

func IsShellCommand(name string) bool

func Loop

func Loop()

func Main

func Main()

func MakeMsg

func MakeMsg(msg string) ([]byte, error)

func MakeScript

func MakeScript(uri string, orole string, script []byte, args []string, res map[string]interface{}) ([]byte, error)

func MakeStop

func MakeStop(orole string) ([]byte, error)

func MakeSync

func MakeSync(orole string) ([]byte, error)

func Marshal

func Marshal(uri string, orole string, pktclass string, pktkey string, args []string, value []byte, ret map[string]interface{}) ([]byte, error)

func MarshalPacket

func MarshalPacket(pkt *NRBundPacket) ([]byte, error)

func NRBundAgent

func NRBundAgent(m *nats.Msg)

func NRBundExecuteScript

func NRBundExecuteScript(m *nats.Msg)

func NatsPublishTelemetry

func NatsPublishTelemetry(QueueName string, data []byte)

func NatsRecv

func NatsRecv(fun nats.MsgHandler)

func NatsRecvSys

func NatsRecvSys(fun nats.MsgHandler)

func NatsSend

func NatsSend(data []byte)

func NatsSendEvent

func NatsSendEvent(data *tc.TCJson) error

func NatsSendLog

func NatsSendLog(data *tc.TCJson) error

func NatsSendMetric

func NatsSendMetric(data *tc.TCJson) error

func NatsSendSys

func NatsSendSys(data []byte)

func NatsSendTelemetry

func NatsSendTelemetry(data *tc.TCJson, uri string, pktkey string) error

func NatsSendTrace

func NatsSendTrace(data *tc.TCJson) error

func NatsTelemetryRecv

func NatsTelemetryRecv(fun nats.MsgHandler)

func Newrelic_Client

func Newrelic_Client()

func Newrelic_NRQL_Shell

func Newrelic_NRQL_Shell()

func ProcessMetric

func ProcessMetric(m *nats.Msg)

func ProcessPrometheusMetric

func ProcessPrometheusMetric(m *nats.Msg)

func ProcessZabbixMetric

func ProcessZabbixMetric(m *nats.Msg)

func Prometheus_Client

func Prometheus_Client()

func ResetLocalConfig

func ResetLocalConfig()

func Run

func Run()

func RunFile

func RunFile(core *stdlib.BUNDEnv, name string)

func RunShellCommand

func RunShellCommand(name string, core *tc.TCstate)

func SendNewRelicEvent

func SendNewRelicEvent(data *gabs.Container)

func SendNewRelicLog

func SendNewRelicLog(data *gabs.Container)

func SendNewRelicMetric

func SendNewRelicMetric(data *gabs.Container)

func SendPrometheusMetric

func SendPrometheusMetric(data *gabs.Container)

func SendStop

func SendStop()

func SendSync

func SendSync()

func SendZabbixEvent

func SendZabbixEvent(data *gabs.Container)

func SendZabbixLog

func SendZabbixLog(data *gabs.Container)

func SendZabbixMetric

func SendZabbixMetric(data *gabs.Container)

func SetApplicationId

func SetApplicationId(atype string)

func SetDefaultConfiguration

func SetDefaultConfiguration()

func Shell

func Shell()

func ShellCommandLast

func ShellCommandLast(core *tc.TCstate) interface{}

func ShellCommandStack

func ShellCommandStack(core *tc.TCstate) interface{}

func ShellCommandVersion

func ShellCommandVersion(core *tc.TCstate) interface{}

func ShellDisplayResult

func ShellDisplayResult(core *tc.TCstate, show bool)

func Stop

func Stop()

func StorageCatchingDaemon

func StorageCatchingDaemon()

func StoreTelemetry

func StoreTelemetry(m *nats.Msg)

func Submit

func Submit()

func Sync

func Sync()

func SysQueueHandler

func SysQueueHandler(m *nats.Msg)

func Take

func Take()

func Telemetry

func Telemetry()

func TelemetryAttributesToMap

func TelemetryAttributesToMap(data *gabs.Container) map[string]interface{}

func UpdateBundVariablesFromLocalConf

func UpdateBundVariablesFromLocalConf(core *stdlib.BUNDEnv)

func UpdateConfigToEtcd

func UpdateConfigToEtcd()

func UpdateLocalConfigFromEtcd

func UpdateLocalConfigFromEtcd()

func Version

func Version()

func WaitSync

func WaitSync() bool

func Watch

func Watch()

func WatchDisplay

func WatchDisplay(m *nats.Msg)

func Zabbix_Client

func Zabbix_Client()

Types

type NATSSync

type NATSSync struct {
}

func (NATSSync) Run

func (s NATSSync) Run()

type NRBundPacket

type NRBundPacket struct {
	Id       string
	Uri      string
	PktId    string
	OrigName string
	OrgRole  string
	PktClass string
	PktKey   string
	Args     []string
	Res      map[string]interface{}
	Value    []byte
}

func NewBundPacket

func NewBundPacket(uri string, orole string, pktclass string, pktkey string, args []string, value []byte, ret map[string]interface{}) *NRBundPacket

func UnMarshal

func UnMarshal(data []byte) *NRBundPacket

func (*NRBundPacket) ApplicationId

func (msg *NRBundPacket) ApplicationId() string

type ShellCommand

type ShellCommand func(*tc.TCstate) interface{}

type TheScript

type TheScript struct {
	Name string
	Uri  string
	Res  map[string]interface{}
	Args []string
}

func (TheScript) Run

func (s TheScript) Run()

Jump to

Keyboard shortcuts

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