Documentation ¶
Index ¶
- Variables
- func AddJob(ctx *fasthttp.RequestCtx)
- func AddJobStats(ctx *fasthttp.RequestCtx)
- func DeleteJob(ctx *fasthttp.RequestCtx)
- func ExecuteYaml(ctx *fasthttp.RequestCtx)
- func Executor(ctx *fasthttp.RequestCtx)
- func GetJobDescription(ctx *fasthttp.RequestCtx)
- func GetJobLogs(ctx *fasthttp.RequestCtx)
- func GetJobSchedule(ctx *fasthttp.RequestCtx)
- func GetJobStats(ctx *fasthttp.RequestCtx)
- func InsertIntoMongo(client *mongo.Client, typeOfValue string, desc string, value string, id string, ...) bool
- func LinkJobs(ctx *fasthttp.RequestCtx)
- func ListJobs(ctx *fasthttp.RequestCtx)
- func SetOdinEnv(mongoURL string)
- func UnlinkJobs(ctx *fasthttp.RequestCtx)
- func UpdateJob(ctx *fasthttp.RequestCtx)
- func UpdateJobRuns(ctx *fasthttp.RequestCtx)
- type ExecNode
- type JobStats
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( // HTTPAddr contains the port used by this node HTTPAddr string )
Functions ¶
func AddJobStats ¶
func AddJobStats(ctx *fasthttp.RequestCtx)
AddJobStats is used to parse collected metrics
func ExecuteYaml ¶
func ExecuteYaml(ctx *fasthttp.RequestCtx)
ExecuteYaml is used to execute a job passed to the command line tool
func Executor ¶
func Executor(ctx *fasthttp.RequestCtx)
Executor is used to execute the item at the head of the job queue
func GetJobDescription ¶
func GetJobDescription(ctx *fasthttp.RequestCtx)
GetJobDescription is used to show a job's description
func GetJobLogs ¶
func GetJobLogs(ctx *fasthttp.RequestCtx)
GetJobLogs is used to retrieve the logs for a job
func GetJobSchedule ¶
func GetJobSchedule(ctx *fasthttp.RequestCtx)
GetJobSchedule is used to parse the request and return a cron time format
func GetJobStats ¶
func GetJobStats(ctx *fasthttp.RequestCtx)
GetJobStats is used to show stats collected by a specified job
func InsertIntoMongo ¶
func InsertIntoMongo(client *mongo.Client, typeOfValue string, desc string, value string, id string, timestamp string) bool
InsertIntoMongo is used to add collected metrics to the observability collection parameters: client (a *mongo.Client), typeOfValue (a string of the type of value being stored), desc (a string describing the value being stored), value (a string of the value being stored), id (a string of the associated Job ID), timestamp (a string of the unix time at which the operation took place) returns: bool (true is successful, false if otherwise)
func ListJobs ¶
func ListJobs(ctx *fasthttp.RequestCtx)
ListJobs is used to list the current jobs running
func SetOdinEnv ¶
func SetOdinEnv(mongoURL string)
SetOdinEnv is used to set variables to be used by running jobs via Odin SDK parameters: mongoURL (a string of the address for the MongoDB instance) returns: nil
func UpdateJobRuns ¶
func UpdateJobRuns(ctx *fasthttp.RequestCtx)
UpdateJobRuns is used to update a job's run number
Types ¶
type ExecNode ¶
ExecNode is a type to be used to unmarshal data into after a HTTP request consists of Items, a byte array of marshaled json, and a store of node details
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a type to be used by the raft consensus protocol consists of a base http address and a store in the finite state machine
func NewService ¶
NewService is used to initialize a new service struct parameters: addr (a string of a http address), store (a store of node details) returns: *Service (a newly initialized service struct)
func (*Service) JoinCluster ¶
func (service *Service) JoinCluster(ctx *fasthttp.RequestCtx)
JoinCluster is used to join a node to an exisiting cluster
func (*Service) LeaveCluster ¶
func (service *Service) LeaveCluster(ctx *fasthttp.RequestCtx)
LeaveCluster is used to remove a node from a cluster