memory

package
v0.0.0-...-8aeb11b Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentBox

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

CommentBox implements CommentDB with in-memory storage.

func NewCommentBox

func NewCommentBox() *CommentBox

NewCommentBox returns a CommentBox instance.

func (*CommentBox) DeleteCommitComment

func (b *CommentBox) DeleteCommitComment(_ context.Context, c *types.CommitComment) error

See documentation for CommentDB.DeleteCommitComment.

func (*CommentBox) DeleteTaskComment

func (b *CommentBox) DeleteTaskComment(_ context.Context, c *types.TaskComment) error

See documentation for CommentDB.DeleteTaskComment.

func (*CommentBox) DeleteTaskSpecComment

func (b *CommentBox) DeleteTaskSpecComment(_ context.Context, c *types.TaskSpecComment) error

See documentation for CommentDB.DeleteTaskSpecComment.

func (*CommentBox) GetCommentsForRepos

func (b *CommentBox) GetCommentsForRepos(_ context.Context, repos []string, from time.Time) ([]*types.RepoComments, error)

See documentation for CommentDB.GetCommentsForRepos.

func (*CommentBox) ModifiedCommitCommentsCh

func (b *CommentBox) ModifiedCommitCommentsCh(ctx context.Context) <-chan []*types.CommitComment

See docs for CommentDB interface.

func (*CommentBox) ModifiedTaskCommentsCh

func (b *CommentBox) ModifiedTaskCommentsCh(ctx context.Context) <-chan []*types.TaskComment

See docs for CommentDB interface.

func (*CommentBox) ModifiedTaskSpecCommentsCh

func (b *CommentBox) ModifiedTaskSpecCommentsCh(ctx context.Context) <-chan []*types.TaskSpecComment

See docs for CommentDB interface.

func (*CommentBox) PutCommitComment

func (b *CommentBox) PutCommitComment(_ context.Context, c *types.CommitComment) error

See documentation for CommentDB.PutCommitComment.

func (*CommentBox) PutTaskComment

func (b *CommentBox) PutTaskComment(_ context.Context, c *types.TaskComment) error

See documentation for CommentDB.PutTaskComment.

func (*CommentBox) PutTaskSpecComment

func (b *CommentBox) PutTaskSpecComment(_ context.Context, c *types.TaskSpecComment) error

See documentation for CommentDB.PutTaskSpecComment.

func (*CommentBox) Wait

func (b *CommentBox) Wait()

Wait for all clients to receive modified data.

type InMemoryDB

type InMemoryDB struct {
	*InMemoryTaskDB
	*InMemoryJobDB
	*CommentBox
}

func NewInMemoryDB

func NewInMemoryDB() *InMemoryDB

NewInMemoryDB returns an extremely simple, inefficient, in-memory DB implementation.

func (*InMemoryDB) Wait

func (d *InMemoryDB) Wait()

type InMemoryJobDB

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

func NewInMemoryJobDB

func NewInMemoryJobDB() *InMemoryJobDB

NewInMemoryJobDB returns an extremely simple, inefficient, in-memory JobDB implementation.

func (*InMemoryJobDB) GetJobById

func (d *InMemoryJobDB) GetJobById(_ context.Context, id string) (*types.Job, error)

See docs for JobDB interface.

func (*InMemoryJobDB) GetJobsFromDateRange

func (d *InMemoryJobDB) GetJobsFromDateRange(_ context.Context, start, end time.Time, repo string) ([]*types.Job, error)

See docs for JobDB interface.

func (*InMemoryJobDB) ModifiedJobsCh

func (d *InMemoryJobDB) ModifiedJobsCh(ctx context.Context) <-chan []*types.Job

See docs for JobDB interface.

func (*InMemoryJobDB) PutJob

func (d *InMemoryJobDB) PutJob(ctx context.Context, job *types.Job) error

See docs for JobDB interface.

func (*InMemoryJobDB) PutJobs

func (d *InMemoryJobDB) PutJobs(ctx context.Context, jobs []*types.Job) error

See docs for JobDB interface.

func (*InMemoryJobDB) PutJobsInChunks

func (d *InMemoryJobDB) PutJobsInChunks(ctx context.Context, jobs []*types.Job) error

See docs for JobDB interface.

func (*InMemoryJobDB) SearchJobs

func (d *InMemoryJobDB) SearchJobs(ctx context.Context, params *db.JobSearchParams) ([]*types.Job, error)

SearchJobs implements db.JobReader.

func (*InMemoryJobDB) Wait

func (d *InMemoryJobDB) Wait()

Wait for all clients to receive modified data.

type InMemoryTaskDB

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

func NewInMemoryTaskDB

func NewInMemoryTaskDB() *InMemoryTaskDB

NewInMemoryTaskDB returns an extremely simple, inefficient, in-memory TaskDB implementation.

func (*InMemoryTaskDB) AssignId

func (d *InMemoryTaskDB) AssignId(_ context.Context, t *types.Task) error

See docs for TaskDB interface. Does not take any locks.

func (*InMemoryTaskDB) GetTaskById

func (d *InMemoryTaskDB) GetTaskById(_ context.Context, id string) (*types.Task, error)

See docs for TaskDB interface.

func (*InMemoryTaskDB) GetTasksFromDateRange

func (d *InMemoryTaskDB) GetTasksFromDateRange(_ context.Context, start, end time.Time, repo string) ([]*types.Task, error)

See docs for TaskDB interface.

func (*InMemoryTaskDB) ModifiedTasksCh

func (d *InMemoryTaskDB) ModifiedTasksCh(ctx context.Context) <-chan []*types.Task

See docs for TaskDB interface.

func (*InMemoryTaskDB) PutTask

func (d *InMemoryTaskDB) PutTask(ctx context.Context, task *types.Task) error

See docs for TaskDB interface.

func (*InMemoryTaskDB) PutTasks

func (d *InMemoryTaskDB) PutTasks(ctx context.Context, tasks []*types.Task) error

See docs for TaskDB interface.

func (*InMemoryTaskDB) PutTasksInChunks

func (d *InMemoryTaskDB) PutTasksInChunks(ctx context.Context, tasks []*types.Task) error

See docs for TaskDB interface.

func (*InMemoryTaskDB) SearchTasks

func (d *InMemoryTaskDB) SearchTasks(ctx context.Context, params *db.TaskSearchParams) ([]*types.Task, error)

SearchTasks implements db.TaskReader.

func (*InMemoryTaskDB) Wait

func (d *InMemoryTaskDB) Wait()

Wait for all clients to receive modified data.

Jump to

Keyboard shortcuts

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