queueing

package
v0.3.7-alpha5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPanic = errors.New("panic")
View Source
var ErrUnknownPanic = errors.New("unknown panic")

Functions

func RandomInt

func RandomInt() (string, error)

func TopicFromServiceRound

func TopicFromServiceRound(roundID uint64) (string, error)

Types

type Config

type Config struct {
	Use   string `default:"none"`
	Kafka struct {
	}
	NSQ struct {
		ProducerNSQD                 string   `default:"nsqd:4150"`
		IgnoreAllScoresIfWorkerFails bool     `default:"true"`
		Topic                        string   `default:"default"`
		MaxInFlight                  int      `default:"200"` // This should be more than min(NumberOfChecks, #NSQD Nodes)
		AuthSecret                   string   `default:""`
		ClientRootCA                 string   `default:""`
		ClientSSLKey                 string   `default:""`
		ClientSSLCert                string   `default:""`
		ConcurrentHandlers           int      `default:"200"`
		NSQLookupd                   []string `default:"[\"\"]"` // "[\"nsqlookupd:4160\"]"
		ConsumerNSQDPool             []string `default:"[\"\"]"` // "[\"nsqd:4150\"]"
	}
}

type IndexedQueue

type IndexedQueue struct {
	Q *QCheck
	I int
}

type MasterConfig

type MasterConfig struct {
	ReportForceRefreshSeconds uint   `default:"60"`
	ChannelPrefix             string `default:"master"`
}

type QCheck

type QCheck struct {
	Service QService
	RoundID uint64
	Passed  bool
	Log     string
	Err     string
}

func CommonExecute

func CommonExecute(sd *ScoringData, execDeadline time.Time) QCheck

type QService

type QService struct {
	ID             uuid.UUID
	Group          string
	Name           string
	ReturningTopic string
}

type RoundTookTooLongToExecuteError added in v0.3.6

type RoundTookTooLongToExecuteError struct {
	Msg string
}

func (*RoundTookTooLongToExecuteError) Error added in v0.3.6

type ScoringData

type ScoringData struct {
	Service    QService
	Properties map[string]string
	Deadline   time.Time
	MasterTime time.Time
	Host       string
	RoundID    uint64
}

Jump to

Keyboard shortcuts

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