server

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidCronJobHandle

func IsValidCronJobHandle(handle string) bool

func IsValidJobHandle

func IsValidJobHandle(handle string) bool

func LocalIP

func LocalIP() (net.IP, error)

func ReadMessage

func ReadMessage(r io.Reader) (runtime.PT, []byte, error)

Types

type AP

type AP string
const (
	AP_Workers         AP = "workers"
	AP_Status          AP = "status"
	AP_Cancel          AP = "cancel-job"
	AP_Show            AP = "show"
	AP_Create          AP = "create"
	AP_Drop            AP = "drop"
	AP_MaxQueue        AP = "maxqueue"
	AP_GetPid          AP = "getpid"
	AP_Shutdown        AP = "shutdown"
	AP_Verbose         AP = "verbose"
	AP_Version         AP = "version"
	AP_PRIORITY_STATUS AP = "prioritystatus"
)

func ParseTextMessage

func ParseTextMessage(msg string) (AP, string)

type Client

type Client struct {
	Session
}

type Config

type Config struct {
	ListenAddr string
	Storage    string
	WebAddress string
}

type Server

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

func NewServer

func NewServer(cfg Config) *Server

func (*Server) Clients

func (s *Server) Clients() int

func (*Server) DeleteCronJob

func (s *Server) DeleteCronJob(cj *CronJob) error

func (*Server) EvtLoop

func (s *Server) EvtLoop()

func (*Server) ExpressionToEpoch

func (s *Server) ExpressionToEpoch(scdTime string) (int64, bool)

func (*Server) Jobs

func (s *Server) Jobs() int

func (*Server) RunningJobsByFunction

func (s *Server) RunningJobsByFunction() map[string]int

func (*Server) RunningJobsByWorker

func (s *Server) RunningJobsByWorker() map[string]int

func (*Server) Start

func (s *Server) Start()

func (*Server) Stats

func (s *Server) Stats() map[string]int

func (*Server) WatchJobTimeout

func (s *Server) WatchJobTimeout()

func (*Server) WatcherLoop

func (s *Server) WatcherLoop()

func (*Server) Workers

func (s *Server) Workers() int

type Session

type Session struct {
	SessionId int64

	ConnectAt time.Time
	// contains filtered or unexported fields
}

func (*Session) Send

func (s *Session) Send(data []byte) bool

type Tuple

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

type Worker

type Worker struct {
	net.Conn
	Session
	// contains filtered or unexported fields
}

func (*Worker) MarshalJSON

func (w *Worker) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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