Documentation ¶
Index ¶
- Constants
- type AuthMode
- type Backend
- func (b *Backend) AtomicWrite(ctx context.Context, condacts []backend.ConditionalAction) (revision string, err error)
- func (b *Backend) Clock() clockwork.Clock
- func (b *Backend) Close() error
- func (b *Backend) CloseWatchers()
- func (b *Backend) CompareAndSwap(ctx context.Context, expected, replaceWith backend.Item) (*backend.Lease, error)
- func (b *Backend) ConditionalDelete(ctx context.Context, key []byte, rev string) error
- func (b *Backend) ConditionalUpdate(ctx context.Context, i backend.Item) (*backend.Lease, error)
- func (b *Backend) Create(ctx context.Context, i backend.Item) (*backend.Lease, error)
- func (b *Backend) Delete(ctx context.Context, key []byte) error
- func (b *Backend) DeleteRange(ctx context.Context, startKey []byte, endKey []byte) error
- func (b *Backend) Get(ctx context.Context, key []byte) (*backend.Item, error)
- func (*Backend) GetName() string
- func (b *Backend) GetRange(ctx context.Context, startKey []byte, endKey []byte, limit int) (*backend.GetResult, error)
- func (b *Backend) KeepAlive(ctx context.Context, lease backend.Lease, expires time.Time) error
- func (b *Backend) NewWatcher(ctx context.Context, watch backend.Watch) (backend.Watcher, error)
- func (b *Backend) Put(ctx context.Context, i backend.Item) (*backend.Lease, error)
- func (b *Backend) Update(ctx context.Context, i backend.Item) (*backend.Lease, error)
- type Config
Constants ¶
const ( Name = "postgresql" AltName = "postgres" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMode ¶
type AuthMode string
AuthMode determines if we should use some environment-specific authentication mechanism or credentials.
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is a PostgreSQL-backed backend.Backend.
func NewFromParams ¶
NewFromParams starts and returns a *Backend with the given params (generally read from the Teleport configuration file).
func NewWithConfig ¶
NewWithConfig starts and returns a *Backend with the given Config.
func (*Backend) AtomicWrite ¶
func (*Backend) CloseWatchers ¶
func (b *Backend) CloseWatchers()
CloseWatchers implements backend.Backend.
func (*Backend) CompareAndSwap ¶
func (b *Backend) CompareAndSwap(ctx context.Context, expected, replaceWith backend.Item) (*backend.Lease, error)
CompareAndSwap implements backend.Backend.
func (*Backend) ConditionalDelete ¶
func (*Backend) ConditionalUpdate ¶
func (*Backend) Create ¶
Create implements backend.Backend.
func (*Backend) Delete ¶
Delete implements backend.Backend.
func (*Backend) DeleteRange ¶
DeleteRange implements backend.Backend.
func (*Backend) Get ¶
Get implements backend.Backend.
func (*Backend) GetRange ¶
func (b *Backend) GetRange(ctx context.Context, startKey []byte, endKey []byte, limit int) (*backend.GetResult, error)
GetRange implements backend.Backend.
func (*Backend) KeepAlive ¶
KeepAlive implements backend.Backend.
func (*Backend) NewWatcher ¶
NewWatcher implements backend.Backend.
func (*Backend) Put ¶
Put implements backend.Backend.
type Config ¶
type Config struct { ConnString string `json:"conn_string"` AuthMode AuthMode `json:"auth_mode"` ChangeFeedConnString string `json:"change_feed_conn_string"` ChangeFeedPollInterval types.Duration `json:"change_feed_poll_interval"` ChangeFeedBatchSize int `json:"change_feed_batch_size"` DisableExpiry bool `json:"disable_expiry"` ExpiryInterval types.Duration `json:"expiry_interval"` ExpiryBatchSize int `json:"expiry_batch_size"` }
Config is the configuration struct for Backend; outside of tests or custom code, it's usually generated by converting the backend.Params from the Teleport configuration file.