Documentation
¶
Index ¶
- Variables
- type Checkpoint
- type DB
- type Host
- type Job
- type PropagatorDB
- func (db *PropagatorDB) DeleteCheckpoint(ctx context.Context, id string) error
- func (db *PropagatorDB) DeleteHost(ctx context.Context, id string) error
- func (db *PropagatorDB) DeleteJob(ctx context.Context, jid string) error
- func (db *PropagatorDB) ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
- func (db *PropagatorDB) ListCheckpointsByJIDs(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
- func (db *PropagatorDB) ListHosts(ctx context.Context, ids ...string) ([]*daemon.Host, error)
- func (db *PropagatorDB) ListJobs(ctx context.Context, jids ...string) ([]*daemon.Job, error)
- func (db *PropagatorDB) ListJobsByHostIDs(ctx context.Context, hostIDs ...string) ([]*daemon.Job, error)
- func (db *PropagatorDB) PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
- func (db *PropagatorDB) PutHost(ctx context.Context, host *daemon.Host) error
- func (db *PropagatorDB) PutJob(ctx context.Context, job *daemon.Job) error
- type SqliteDB
- func (db *SqliteDB) DeleteCheckpoint(ctx context.Context, id string) error
- func (db *SqliteDB) DeleteHost(ctx context.Context, id string) error
- func (db *SqliteDB) DeleteJob(ctx context.Context, jid string) error
- func (db *SqliteDB) ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
- func (db *SqliteDB) ListCheckpointsByJIDs(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
- func (db *SqliteDB) ListHosts(ctx context.Context, ids ...string) ([]*daemon.Host, error)
- func (db *SqliteDB) ListJobs(ctx context.Context, jids ...string) ([]*daemon.Job, error)
- func (db *SqliteDB) ListJobsByHostIDs(ctx context.Context, hostIDs ...string) ([]*daemon.Job, error)
- func (db *SqliteDB) PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
- func (db *SqliteDB) PutHost(ctx context.Context, host *daemon.Host) error
- func (db *SqliteDB) PutJob(ctx context.Context, job *daemon.Job) error
- type UnimplementedDB
- func (UnimplementedDB) DeleteCheckpoint(ctx context.Context, id string) error
- func (UnimplementedDB) DeleteHost(ctx context.Context, id string) error
- func (UnimplementedDB) DeleteJob(ctx context.Context, jid string) error
- func (UnimplementedDB) ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
- func (UnimplementedDB) ListCheckpointsByJID(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
- func (UnimplementedDB) ListHosts(ctx context.Context, ids ...string) ([]*daemon.Host, error)
- func (UnimplementedDB) ListJobs(ctx context.Context, jids ...string) ([]*daemon.Job, error)
- func (UnimplementedDB) PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
- func (UnimplementedDB) PutHost(ctx context.Context, host *daemon.Host) error
- func (UnimplementedDB) PutJob(ctx context.Context, job *daemon.Job) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Ddl string
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶ added in v0.9.244
type Checkpoint interface {
PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
ListCheckpointsByJIDs(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
DeleteCheckpoint(ctx context.Context, id string) error
}
type DB ¶
type DB interface {
Job
Host
Checkpoint
}
type PropagatorDB ¶
type PropagatorDB struct {
config.Connection
// contains filtered or unexported fields
}
func NewPropagatorDB ¶
func NewPropagatorDB(ctx context.Context, connection config.Connection, fallback ...DB) *PropagatorDB
func (*PropagatorDB) DeleteCheckpoint ¶
func (db *PropagatorDB) DeleteCheckpoint(ctx context.Context, id string) error
func (*PropagatorDB) DeleteHost ¶
func (db *PropagatorDB) DeleteHost(ctx context.Context, id string) error
func (*PropagatorDB) DeleteJob ¶
func (db *PropagatorDB) DeleteJob(ctx context.Context, jid string) error
func (*PropagatorDB) ListCheckpoints ¶
func (db *PropagatorDB) ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
func (*PropagatorDB) ListCheckpointsByJIDs ¶
func (db *PropagatorDB) ListCheckpointsByJIDs(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
func (*PropagatorDB) ListJobsByHostIDs ¶
func (*PropagatorDB) PutCheckpoint ¶
func (db *PropagatorDB) PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
type SqliteDB ¶
type SqliteDB struct {
UnimplementedDB
// contains filtered or unexported fields
}
func (*SqliteDB) DeleteCheckpoint ¶
func (*SqliteDB) ListCheckpoints ¶
func (*SqliteDB) ListCheckpointsByJIDs ¶
func (*SqliteDB) ListJobsByHostIDs ¶
func (*SqliteDB) PutCheckpoint ¶
type UnimplementedDB ¶
type UnimplementedDB struct{}
func (UnimplementedDB) DeleteCheckpoint ¶
func (UnimplementedDB) DeleteCheckpoint(ctx context.Context, id string) error
func (UnimplementedDB) DeleteHost ¶
func (UnimplementedDB) DeleteHost(ctx context.Context, id string) error
func (UnimplementedDB) DeleteJob ¶
func (UnimplementedDB) DeleteJob(ctx context.Context, jid string) error
func (UnimplementedDB) ListCheckpoints ¶
func (UnimplementedDB) ListCheckpoints(ctx context.Context, ids ...string) ([]*daemon.Checkpoint, error)
func (UnimplementedDB) ListCheckpointsByJID ¶
func (UnimplementedDB) ListCheckpointsByJID(ctx context.Context, jids ...string) ([]*daemon.Checkpoint, error)
func (UnimplementedDB) PutCheckpoint ¶
func (UnimplementedDB) PutCheckpoint(ctx context.Context, checkpoint *daemon.Checkpoint) error
Click to show internal directories.
Click to hide internal directories.