controllers

package
v0.0.0-...-0888c38 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterIDs

type ClusterIDs []uuid.UUID

ClusterIDs represents an array of cluster IDs.

func (*ClusterIDs) Scan

func (p *ClusterIDs) Scan(src interface{}) error

Scan Scans the sqlx database type ([]bytes) into the ClusterIds type.

func (ClusterIDs) Value

func (p ClusterIDs) Value() (driver.Value, error)

Value Returns a golang database/sql driver value for ClusterIDs.

type CronScript

type CronScript struct {
	ID         uuid.UUID  `db:"id"`
	OrgID      uuid.UUID  `db:"org_id"`
	Script     string     `db:"script"`
	ClusterIDs ClusterIDs `db:"cluster_ids"`
	ConfigStr  string     `db:"configs"`
	Enabled    bool       `db:"enabled"`
	FrequencyS int64      `db:"frequency_s"`
}

CronScript contains metadata about a regularly scheduled script.

type HandleNATSMessageFunc

type HandleNATSMessageFunc func(*cvmsgspb.V2CMessage)

HandleNATSMessageFunc is the signature for a NATS message handler.

type Server

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

Server is a bridge implementation of the pluginService.

func New

func New(db *sqlx.DB, dbKey string, nc *nats.Conn, vzmgrClient vzmgrpb.VZMgrServiceClient) *Server

New creates a new server.

func (*Server) CreateScript

CreateScript creates a cron script.

func (*Server) DeleteScript

DeleteScript deletes a cron script.

func (*Server) GetScript

GetScript gets a script stored in the cron script service.

func (*Server) GetScripts

GetScripts gets scripts stored in the cron script service, given a set of IDs.

func (*Server) HandleChecksumRequest

func (s *Server) HandleChecksumRequest(msg *cvmsgspb.V2CMessage)

HandleChecksumRequest handles incoming requests for cronscript checksums.

func (*Server) HandleScriptsRequest

func (s *Server) HandleScriptsRequest(msg *cvmsgspb.V2CMessage)

HandleScriptsRequest handles incoming requests for cron scripts registered to the given vizier.

func (*Server) Stop

func (s *Server) Stop()

Stop performs any necessary cleanup before shutdown.

func (*Server) UpdateScript

UpdateScript updates an existing cron script.

Jump to

Keyboard shortcuts

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