mongo

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store

func NewStore

func NewStore(option *StoreOption) *Store

NewStore

func (*Store) BatchCreatTaskIns

func (s *Store) BatchCreatTaskIns(taskIns []*entity.TaskInstance) error

BatchCreatTaskIns

func (*Store) BatchDeleteDag

func (s *Store) BatchDeleteDag(ids []string) error

BatchDeleteDag only for test

func (*Store) BatchDeleteDagIns

func (s *Store) BatchDeleteDagIns(ids []string) error

BatchDeleteDagIns only for test

func (*Store) BatchDeleteTaskIns

func (s *Store) BatchDeleteTaskIns(ids []string) error

BatchDeleteTaskIns only for test

func (*Store) BatchUpdateDagIns

func (s *Store) BatchUpdateDagIns(dagIns []*entity.DagInstance) error

BatchUpdateDagIns

func (*Store) BatchUpdateTaskIns

func (s *Store) BatchUpdateTaskIns(taskIns []*entity.TaskInstance) error

BatchUpdateTaskIns

func (*Store) Close

func (s *Store) Close()

Close component when we not use it anymore

func (*Store) CreateDag

func (s *Store) CreateDag(dag *entity.Dag) error

CreateDag

func (*Store) CreateDagIns

func (s *Store) CreateDagIns(dagIns *entity.DagInstance) error

CreateDagIns

func (*Store) CreateTaskIns

func (s *Store) CreateTaskIns(taskIns *entity.TaskInstance) error

CreateTaskIns

func (*Store) GetDag

func (s *Store) GetDag(dagId string) (*entity.Dag, error)

GetDag

func (*Store) GetDagInstance

func (s *Store) GetDagInstance(dagInsId string) (*entity.DagInstance, error)

GetDagInstance

func (*Store) GetTaskIns

func (s *Store) GetTaskIns(taskInsId string) (*entity.TaskInstance, error)

GetTaskIns

func (*Store) Init

func (s *Store) Init() error

Init store

func (*Store) ListDag

func (s *Store) ListDag(input *mod.ListDagInput) ([]*entity.Dag, error)

ListDag only for test, not need for grid fs

func (*Store) ListDagInstance

func (s *Store) ListDagInstance(input *mod.ListDagInstanceInput) ([]*entity.DagInstance, error)

ListDagInstance

func (*Store) ListTaskInstance

func (s *Store) ListTaskInstance(input *mod.ListTaskInstanceInput) ([]*entity.TaskInstance, error)

ListTaskInstance

func (*Store) Marshal

func (s *Store) Marshal(obj interface{}) ([]byte, error)

Marshal

func (*Store) PatchDagIns

func (s *Store) PatchDagIns(dagIns *entity.DagInstance, mustsPatchFields ...string) error

PatchDagIns

func (*Store) PatchTaskIns

func (s *Store) PatchTaskIns(taskIns *entity.TaskInstance) error

PatchTaskIns

func (*Store) Unmarshal

func (s *Store) Unmarshal(bytes []byte, ptr interface{}) error

Unmarshal

func (*Store) UpdateDag

func (s *Store) UpdateDag(dag *entity.Dag) error

UpdateDag

func (*Store) UpdateDagIns

func (s *Store) UpdateDagIns(dagIns *entity.DagInstance) error

UpdateDagIns

func (*Store) UpdateTaskIns

func (s *Store) UpdateTaskIns(taskIns *entity.TaskInstance) error

UpdateTaskIns

type StoreOption

type StoreOption struct {
	// mongo connection string
	ConnStr  string
	Database string
	// Timeout access mongo timeout.default 5s
	Timeout time.Duration
	// the prefix will append to the database
	Prefix string
	// If it uses GridFS Buckets to store dag
	WithGridFS bool
}

StoreOption

Jump to

Keyboard shortcuts

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