Documentation
¶
Index ¶
- Constants
- Variables
- func FullVersion() string
- func SafeParseInt(s string, d int) int
- func SafeParseUint64(s string, d uint64) uint64
- type BoltStore
- func (store *BoltStore) All() (jobs []*Job, err error)
- func (store *BoltStore) Close() error
- func (store *BoltStore) Find(ids ...ID) (jobs []*Job, err error)
- func (store *BoltStore) Get(id ID) (*Job, error)
- func (store *BoltStore) NextId() ID
- func (store *BoltStore) Save(job *Job) error
- func (store *BoltStore) Search(q string) (jobs []*Job, err error)
- type Data
- type DataType
- type ID
- type IdGenerator
- type Job
- func (j *Job) Close() error
- func (j *Job) Enqueue() error
- func (j *Job) Error(err error) error
- func (j *Job) Execute() (err error)
- func (j *Job) Id() ID
- func (j *Job) Kill(force bool) (err error)
- func (j *Job) Killed() bool
- func (j *Job) Start(worker string) error
- func (j *Job) Stop() error
- func (j *Job) Wait()
- func (j *Job) Write(input io.Reader) (int64, error)
- type KeyError
- type LocalData
- type MemoryStore
- func (store *MemoryStore) All() (jobs []*Job, err error)
- func (store *MemoryStore) Close() error
- func (store *MemoryStore) Find(ids ...ID) (jobs []*Job, err error)
- func (store *MemoryStore) Get(id ID) (job *Job, err error)
- func (store *MemoryStore) NextId() ID
- func (store *MemoryStore) Save(job *Job) error
- func (store *MemoryStore) Search(q string) (jobs []*Job, err error)
- type Metrics
- func (m *Metrics) Counter(subsystem, name string) prometheus.Counter
- func (m *Metrics) CounterVec(subsystem, name string) *prometheus.CounterVec
- func (m *Metrics) Gauge(subsystem, name string) prometheus.Gauge
- func (m *Metrics) GaugeVec(subsystem, name string) *prometheus.GaugeVec
- func (m *Metrics) Handler() http.Handler
- func (m *Metrics) NewCounter(subsystem, name, help string) prometheus.Counter
- func (m *Metrics) NewCounterFunc(subsystem, name, help string, f func() float64) prometheus.CounterFunc
- func (m *Metrics) NewCounterVec(subsystem, name, help string, labels []string) *prometheus.CounterVec
- func (m *Metrics) NewGauge(subsystem, name, help string) prometheus.Gauge
- func (m *Metrics) NewGaugeFunc(subsystem, name, help string, f func() float64) prometheus.GaugeFunc
- func (m *Metrics) NewGaugeVec(subsystem, name, help string, labels []string) *prometheus.GaugeVec
- func (m *Metrics) NewSummary(subsystem, name, help string) prometheus.Summary
- func (m *Metrics) NewSummaryVec(subsystem, name, help string, labels []string) *prometheus.SummaryVec
- func (m *Metrics) Run(addr string)
- func (m *Metrics) Summary(subsystem, name string) prometheus.Summary
- func (m *Metrics) SummaryVec(subsystem, name string) *prometheus.SummaryVec
- type Options
- type Server
- func (s *Server) AddRoute(method, path string, handler http.Handler)
- func (s *Server) CloseHandler() httprouter.Handle
- func (s *Server) CreateHandler() httprouter.Handle
- func (s *Server) IndexHandler() httprouter.Handle
- func (s *Server) KillHandler() httprouter.Handle
- func (s *Server) ListenAndServe()
- func (s *Server) LogsHandler() httprouter.Handle
- func (s *Server) OutputHandler() httprouter.Handle
- func (s *Server) SearchHandler() httprouter.Handle
- func (s *Server) Shutdown()
- func (s *Server) WriteHandler() httprouter.Handle
- type State
- type Store
- type URI
Constants ¶
View Source
const ( DefaultDataPath = "./data" DefaultBacklog = 32 DefaultThreads = 16 )
Variables ¶
View Source
var ( // Version release version Version = "1.0.0" // Build will be overwritten automatically by the build system Build = "dev" // GitCommit will be overwritten automatically by the build system GitCommit = "HEAD" )
View Source
var DefObjectives = map[float64]float64{
0.50: 0.05,
0.90: 0.01,
0.95: 0.005,
0.99: 0.001,
}
DefObjectives ...
View Source
var (
ErrNotExist = errors.New("key does not exist")
)
Functions ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns the full version, build and commit hash
Types ¶
type Data ¶
type Data interface { Read(id ID, dtype DataType) (io.ReadCloser, error) Write(id ID, dtype DataType) (io.WriteCloser, error) Tail(id ID, dtype DataType, ctx context.Context) (chan string, chan error) }
func NewLocalData ¶
type IdGenerator ¶
func (*IdGenerator) Next ¶
func (id *IdGenerator) Next() ID
type Job ¶
type Job struct { sync.RWMutex ID ID `json:"id"` Name string `json:"name"` Args []string `json:"args"` Interactive bool `json:"interactive"` Worker string `json:"worker"` State State `json:"state"` Status int `json:"status"` CreatedAt time.Time `json:"created"` StartedAt time.Time `json:"started"` StoppedAt time.Time `json:"stopped"` KilledAt time.Time `json:"killed"` ErroredAt time.Time `json:"errored"` // contains filtered or unexported fields }
Job ...
type LocalData ¶
type LocalData struct {
// contains filtered or unexported fields
}
type MemoryStore ¶
func (*MemoryStore) All ¶
func (store *MemoryStore) All() (jobs []*Job, err error)
func (*MemoryStore) Close ¶
func (store *MemoryStore) Close() error
func (*MemoryStore) NextId ¶
func (store *MemoryStore) NextId() ID
func (*MemoryStore) Save ¶
func (store *MemoryStore) Save(job *Job) error
type Metrics ¶
Metrics ...
func InitMetrics ¶
func (*Metrics) Counter ¶
func (m *Metrics) Counter(subsystem, name string) prometheus.Counter
Counter ...
func (*Metrics) CounterVec ¶
func (m *Metrics) CounterVec(subsystem, name string) *prometheus.CounterVec
CounterVec ...
func (*Metrics) GaugeVec ¶
func (m *Metrics) GaugeVec(subsystem, name string) *prometheus.GaugeVec
GaugeVec ...
func (*Metrics) NewCounter ¶
func (m *Metrics) NewCounter(subsystem, name, help string) prometheus.Counter
NewCounter ...
func (*Metrics) NewCounterFunc ¶
func (m *Metrics) NewCounterFunc(subsystem, name, help string, f func() float64) prometheus.CounterFunc
NewCounterFunc ...
func (*Metrics) NewCounterVec ¶
func (m *Metrics) NewCounterVec(subsystem, name, help string, labels []string) *prometheus.CounterVec
NewCounterVec ...
func (*Metrics) NewGauge ¶
func (m *Metrics) NewGauge(subsystem, name, help string) prometheus.Gauge
NewGauge ...
func (*Metrics) NewGaugeFunc ¶
func (m *Metrics) NewGaugeFunc(subsystem, name, help string, f func() float64) prometheus.GaugeFunc
NewGaugeFunc ...
func (*Metrics) NewGaugeVec ¶
func (m *Metrics) NewGaugeVec(subsystem, name, help string, labels []string) *prometheus.GaugeVec
NewGaugeVec ...
func (*Metrics) NewSummary ¶
func (m *Metrics) NewSummary(subsystem, name, help string) prometheus.Summary
NewSummary ...
func (*Metrics) NewSummaryVec ¶
func (m *Metrics) NewSummaryVec(subsystem, name, help string, labels []string) *prometheus.SummaryVec
NewSummaryVec ...
func (*Metrics) Summary ¶
func (m *Metrics) Summary(subsystem, name string) prometheus.Summary
Summary ...
func (*Metrics) SummaryVec ¶
func (m *Metrics) SummaryVec(subsystem, name string) *prometheus.SummaryVec
SummaryVec ...
type State ¶
type State int
State ...
const ( STATE_CREATED State STATE_WAITING STATE_RUNNING STATE_STOPPED STATE_KILLED STATE_ERRORED )
func ParseState ¶
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Storm.
|
Package codec contains sub-packages with different codecs that can be used to encode and decode entities in Storm. |
gob
Package gob contains a codec to encode and decode entities in Gob format
|
Package gob contains a codec to encode and decode entities in Gob format |
json
Package json contains a codec to encode and decode entities in JSON format
|
Package json contains a codec to encode and decode entities in JSON format |
msgpack
Package msgpack contains a codec to encode and decode entities in msgpack format
|
Package msgpack contains a codec to encode and decode entities in msgpack format |
Click to show internal directories.
Click to hide internal directories.