wart

package
v0.0.0-...-0de81ca Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const CRASHED = "crashed"

CRASHED crashed

View Source
const DISABLED = "disabled"

DISABLED disabled

View Source
const ENABLED = "enabled"

ENABLED enabled

View Source
const ONLINE = "online"

ONLINE online

View Source
const RUNNING = "running"

RUNNING running

View Source
const STOPPED = "stopped"

STOPPED stopped

Variables

This section is empty.

Functions

func CheckJobs

func CheckJobs(w *Wart)

CheckJobs Checks redis for any jobs that need scheduled.

func CheckThreads

func CheckThreads(w *Wart)

CheckThreads Checks threads in redis for any that need ran.

func IsEnabled

func IsEnabled(w *Wart) bool

IsEnabled Returns if the wart is enabled.

Types

type EndpointMeta

type EndpointMeta struct {
	Key     string
	Stopped bool
	// contains filtered or unexported fields
}

EndpointMeta represents an endpoint

type JobMeta

type JobMeta struct {
	Key     string
	Stopped bool
	// contains filtered or unexported fields
}

JobMeta Struct that represents a job.

type SQLWrapper

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

SQLWrapper wrapper struct

func (*SQLWrapper) Close

func (sw *SQLWrapper) Close() error

Close - library implementation of sql close

func (*SQLWrapper) Exec

func (sw *SQLWrapper) Exec(query string, args ...interface{}) otto.Value

Exec - library implementation of sql queries

func (*SQLWrapper) Ping

func (sw *SQLWrapper) Ping() error

Ping - library implementation of sql pings

func (*SQLWrapper) Query

func (sw *SQLWrapper) Query(query string, args ...interface{}) []map[string]otto.Value

Query - library implementation of sql queries

type TaskInterface

type TaskInterface interface {
	// contains filtered or unexported methods
}

TaskInterface Everything we do is a task. This the interface.

type ThreadMeta

type ThreadMeta struct {
	Key     string
	Stopped bool
	// contains filtered or unexported fields
}

ThreadMeta struct that represents a thread

type Wart

type Wart struct {
	RedisAddr     string
	RedisPassword string
	Cluster       string
	WartName      string
	ScriptList    string
	Client        *redis.Client
	Healthy       bool
	ThreadCount   int

	SecondsTillDead int
	VMStopChan      chan func()
	// contains filtered or unexported fields
}

Wart main structure for wart

func Create

func Create(configFile string, redisAddr string, redisPassword string, cluster string, wartName string, scriptList string, host bool, hostPort string, healthPort string) (*Wart, error)

Create Creates a wart

func (*Wart) Shutdown

func (w *Wart) Shutdown()

Shutdown Shutsdown the wart by safely stopping threads

Jump to

Keyboard shortcuts

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