Documentation ¶
Index ¶
- Constants
- func Connect(ctx context.Context, conn string, maxTimeout time.Duration) (*pgxpool.Pool, error)
- func NewPostgresConfigurationStore(logger logger.Logger) configuration.Store
- type ConfigurationStore
- func (p *ConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
- func (p *ConfigurationStore) GetComponentMetadata() map[string]string
- func (p *ConfigurationStore) Init(parentCtx context.Context, metadata configuration.Metadata) error
- func (p *ConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, ...) (string, error)
- func (p *ConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
Constants ¶
View Source
const (
QueryTableExists = "SELECT EXISTS (SELECT FROM pg_tables where tablename = $1)"
)
Variables ¶
This section is empty.
Functions ¶
func NewPostgresConfigurationStore ¶
func NewPostgresConfigurationStore(logger logger.Logger) configuration.Store
Types ¶
type ConfigurationStore ¶
type ConfigurationStore struct { ActiveSubscriptions map[string]*subscription // contains filtered or unexported fields }
func (*ConfigurationStore) Get ¶
func (p *ConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
func (*ConfigurationStore) GetComponentMetadata ¶
func (p *ConfigurationStore) GetComponentMetadata() map[string]string
GetComponentMetadata returns the metadata of the component.
func (*ConfigurationStore) Init ¶
func (p *ConfigurationStore) Init(parentCtx context.Context, metadata configuration.Metadata) error
func (*ConfigurationStore) Subscribe ¶
func (p *ConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, handler configuration.UpdateHandler) (string, error)
func (*ConfigurationStore) Unsubscribe ¶
func (p *ConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
Click to show internal directories.
Click to hide internal directories.