Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Lock(jid string, eta uint32) error IsLocked(jid string) (bool, error) Unlock(jid string) error Done(jid string, cid_log map[string]string, assetCid map[string]string) error Failed(jid string, cid_log map[string]string, assetCid map[string]string) error List() ([]string, error) Get(jid string) (*Job, error) Timeout(jid string) error Cancel(jid string, cid_log map[string]string) (interface{}, error) DatabaseStats() (kvdb.Stats, error) Peers(...peerCore.ID) Client Close() }
type DelayConfig ¶
type DelayConfig struct {
Time int `cbor:"1,keyasint"` // Inject delay in second
}
type GitRepository ¶
type HeadCommit ¶
type HeadCommit struct {
ID string `json:"id" cbor:"33,keyasint"`
}
type Job ¶
type Job struct { Id string `cbor:"1,keyasint"` Timestamp int64 `cbor:"2,keyasint"` Status JobStatus `cbor:"3,keyasint"` LogLock sync.Mutex Logs map[string]string `cbor:"11,keyasint"` // Cid of logs Meta Meta `cbor:"15,keyasint"` CidLock sync.Mutex AssetCid map[string]string `cbor:"20,keyasint"` // Build Cid Attempt int `cbor:"30,keyasint"` Delay *DelayConfig `cbor:"99,keyasint"` // Inject a delay to run a job }
type Meta ¶
type Meta struct { Ref string `json:"ref" cbor:"4,keyasint"` Before string `json:"before" cbor:"8,keyasint"` After string `json:"after" cbor:"16,keyasint"` HeadCommit HeadCommit `json:"head_commit" cbor:"32,keyasint"` Repository Repository `cbor:"64,keyasint"` }
TODO: optimize cbor storage
type Repository ¶
Click to show internal directories.
Click to hide internal directories.