Documentation ¶
Index ¶
- type Pipe
- type PipeDesc
- type PipesConfig
- type Service
- func (s *Service) CreatePipe(p Pipe) (PipeDesc, error)
- func (s *Service) DeletePipe(name string) error
- func (s *Service) EnsurePipe(p Pipe) (PipeDesc, error)
- func (s *Service) GetPipe(name string) (PipeDesc, error)
- func (s *Service) GetPipes() []Pipe
- func (s *Service) Init(ctx context.Context) error
- func (s *Service) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipe ¶
type Pipe struct { // Name contains the pipe name Name string // TagsCond contains the condition for selecting partitions for the pipe TagsCond string // FltCond contains the condition for filtering records from the partitions provided. FltCond string }
Pipe struct describes a pipe.
type PipesConfig ¶
type PipesConfig struct { // Dir contains the directory where pipes information is persisted Dir string // Ensure contains slice of pipes to be created on initialization stage EnsureAtStart []Pipe }
PipesConfig is a configuration struct used for starting the service
func (*PipesConfig) Apply ¶
func (pc *PipesConfig) Apply(other *PipesConfig)
func (PipesConfig) String ¶
func (pc PipesConfig) String() string
type Service ¶
type Service struct { CurProvider cursor.Provider `inject:""` Journals *journal2.Service `inject:""` Config *PipesConfig `inject:""` // contains filtered or unexported fields }
Service struct provides functionality by managing pipes
func (*Service) CreatePipe ¶
CreatePipe creates new pipe by name and conditions provided. Returns an error if the pipe already exists or conditions could not be parsed. No error means the pipe is created successfully with parameters provided.
func (*Service) DeletePipe ¶
DeletePipe deletes the pipe by its name, but it doesn't delete the corresponding partition. The pipe's partition must be deleted via partition.Truncate method
func (*Service) EnsurePipe ¶
EnsurePipe checks whether the pipe exists. It will create the new one if it does not exist. The function will return an error if there is a pipe with the name provided, but with another settings, than p