monitoring

package module
v0.0.0-...-8c4c9fd Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

README

monitoring

Site monitoring

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObjectsFromList

func ObjectsFromList(list interface{}) (*concurrent.List, error)

func ReadConfig

func ReadConfig(fileName string) (res json.Map, err error)

func RegisterChannelType

func RegisterChannelType(typeName string, constructor ChannelConstructor)

func RegisterObjectType

func RegisterObjectType(typeName string, constructor ObjectConstructor)

func RemoveChannelType

func RemoveChannelType(typeName string)

func RemoveObjectType

func RemoveObjectType(typeName string)

Types

type Channel

type Channel interface {
	Log(title, message string)
}

func ChannelsFromList

func ChannelsFromList(iface interface{}) ([]Channel, error)

func ConstructorChannelTelegram

func ConstructorChannelTelegram(m json.Map) (res Channel, err error)

type ChannelConstructor

type ChannelConstructor func(m json.Map) (Channel, error)

type ChannelTelegram

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

func (*ChannelTelegram) Log

func (s *ChannelTelegram) Log(title, message string)

type HttpGet

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

func (*HttpGet) Request

func (s *HttpGet) Request()

type Monitoring

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

func FromConfig

func FromConfig(ctx context.Context, fileName string) (res *Monitoring, err error)

func FromMap

func FromMap(ctx context.Context, m json.Map) *Monitoring

func New

func New(ctx context.Context, objects []Object, interval time.Duration) *Monitoring

func (*Monitoring) Cancel

func (s *Monitoring) Cancel()

func (*Monitoring) ObjectAdd

func (s *Monitoring) ObjectAdd(obj Object)

func (*Monitoring) ObjectRemove

func (s *Monitoring) ObjectRemove(obj Object)

type Object

type Object interface {
	Request()
}

func ConstructorObjectHttpGet

func ConstructorObjectHttpGet(m json.Map) (res Object, err error)

type ObjectConstructor

type ObjectConstructor func(m json.Map) (Object, error)

Jump to

Keyboard shortcuts

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