mongodb

package
v2.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mongo pkgMongo.Config `yaml:",inline"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Store

type Store struct {
	*pkgMongo.Store
}

func New

func New(ctx context.Context, cfg *Config, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider) (*Store, error)

func (*Store) Close

func (s *Store) Close(ctx context.Context) error

func (*Store) CreateAppliedConfiguration

func (s *Store) CreateAppliedConfiguration(ctx context.Context, adc *pb.AppliedConfiguration, force bool) (*pb.AppliedConfiguration, *pb.AppliedConfiguration, error)

func (*Store) CreateCondition

func (s *Store) CreateCondition(ctx context.Context, cond *pb.Condition) (*pb.Condition, error)

func (*Store) CreateConfiguration

func (s *Store) CreateConfiguration(ctx context.Context, conf *pb.Configuration) (*pb.Configuration, error)

func (*Store) DeleteAppliedConfigurations

func (s *Store) DeleteAppliedConfigurations(ctx context.Context, owner string, query *pb.DeleteAppliedConfigurationsRequest) error

func (*Store) DeleteConditions

func (s *Store) DeleteConditions(ctx context.Context, owner string, query *pb.DeleteConditionsRequest) error

func (*Store) DeleteConfigurations

func (s *Store) DeleteConfigurations(ctx context.Context, owner string, query *pb.DeleteConfigurationsRequest) error

func (*Store) GetAppliedConfigurations

func (s *Store) GetAppliedConfigurations(ctx context.Context, owner string, query *pb.GetAppliedConfigurationsRequest, p store.ProccessAppliedConfigurations) error

func (*Store) GetConditions

func (s *Store) GetConditions(ctx context.Context, owner string, query *pb.GetConditionsRequest, p store.Process[store.Condition]) error

func (*Store) GetConfigurations

func (s *Store) GetConfigurations(ctx context.Context, owner string, query *pb.GetConfigurationsRequest, p store.Process[store.Configuration]) error

func (*Store) GetLatestConfigurationsByID

func (s *Store) GetLatestConfigurationsByID(ctx context.Context, owner string, ids []string, p store.ProcessConfigurations) error

GetLatestConfigurationsByID returns the latest configuration from documents matched by ID

func (*Store) GetLatestEnabledConditions

func (s *Store) GetLatestEnabledConditions(ctx context.Context, owner string, query *store.GetLatestConditionsQuery, p store.ProcessConditions) error

func (*Store) GetPendingAppliedConfigurationResourceUpdates

func (s *Store) GetPendingAppliedConfigurationResourceUpdates(ctx context.Context, expiredOnly bool, p store.ProccessAppliedConfigurations) (int64, error)

func (*Store) InsertAppliedConfigurations

func (s *Store) InsertAppliedConfigurations(ctx context.Context, confs ...*store.AppliedConfiguration) error

func (*Store) InsertConditions

func (s *Store) InsertConditions(ctx context.Context, conds ...*store.Condition) error

func (*Store) InsertConfigurations

func (s *Store) InsertConfigurations(ctx context.Context, confs ...*store.Configuration) error

func (*Store) UpdateAppliedConfigurationResource

func (s *Store) UpdateAppliedConfigurationResource(ctx context.Context, owner string, query store.UpdateAppliedConfigurationResourceRequest) (*pb.AppliedConfiguration, error)

func (*Store) UpdateCondition

func (s *Store) UpdateCondition(ctx context.Context, cond *pb.Condition) (*pb.Condition, error)

func (*Store) UpdateConfiguration

func (s *Store) UpdateConfiguration(ctx context.Context, conf *pb.Configuration) (*pb.Configuration, error)

Jump to

Keyboard shortcuts

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