Documentation ¶
Overview ¶
Package dynamodbDynamoDBBackend implements DynamoDB storage backend for Teleport auth service, similar to etcd backend.
dynamo package implements the DynamoDB storage back-end for the auth server. Originally contributed by https://github.com/apestel
limitations:
- Paging is not implemented, hence all range operations are limited to 1MB result set
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetName() string
- func New(params backend.Params) (backend.Backend, error)
- type DynamoConfig
- type DynamoDBBackend
- func (b *DynamoDBBackend) AcquireLock(token string, ttl time.Duration) error
- func (b *DynamoDBBackend) Clock() clockwork.Clock
- func (b *DynamoDBBackend) Close() error
- func (b *DynamoDBBackend) CreateVal(path []string, key string, val []byte, ttl time.Duration) error
- func (b *DynamoDBBackend) DeleteBucket(path []string, key string) error
- func (b *DynamoDBBackend) DeleteKey(path []string, key string) error
- func (b *DynamoDBBackend) GetKeys(path []string) ([]string, error)
- func (b *DynamoDBBackend) GetVal(path []string, key string) ([]byte, error)
- func (b *DynamoDBBackend) ReleaseLock(token string) error
- func (b *DynamoDBBackend) UpsertVal(path []string, key string, val []byte, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamoConfig ¶
type DynamoConfig struct { // Region is where DynamoDB Table will be used to store k/v Region string `json:"region,omitempty"` // AWS AccessKey used to authenticate DynamoDB queries (prefer IAM role instead of hardcoded value) AccessKey string `json:"access_key,omitempty"` // AWS SecretKey used to authenticate DynamoDB queries (prefer IAM role instead of hardcoded value) SecretKey string `json:"secret_key,omitempty"` // Tablename where to store K/V in DynamoDB Tablename string `json:"table_name,omitempty"` }
DynamoConfig structure represents DynamoDB confniguration as appears in `storage` section of Teleport YAML
type DynamoDBBackend ¶
type DynamoDBBackend struct {
// contains filtered or unexported fields
}
DynamoDBBackend struct
func (*DynamoDBBackend) AcquireLock ¶
func (b *DynamoDBBackend) AcquireLock(token string, ttl time.Duration) error
AcquireLock for a token
func (*DynamoDBBackend) Clock ¶
func (b *DynamoDBBackend) Clock() clockwork.Clock
Clock returns wall clock
func (*DynamoDBBackend) DeleteBucket ¶
func (b *DynamoDBBackend) DeleteBucket(path []string, key string) error
DeleteBucket remove all prefixed keys WARNING: there is no bucket feature, deleting "bucket" mean a deletion one by one
func (*DynamoDBBackend) DeleteKey ¶
func (b *DynamoDBBackend) DeleteKey(path []string, key string) error
DeleteKey remove a key
func (*DynamoDBBackend) GetKeys ¶
func (b *DynamoDBBackend) GetKeys(path []string) ([]string, error)
GetKeys retrieve all keys matching specific path
func (*DynamoDBBackend) GetVal ¶
func (b *DynamoDBBackend) GetVal(path []string, key string) ([]byte, error)
GetVal retrieve a value from a key
func (*DynamoDBBackend) ReleaseLock ¶
func (b *DynamoDBBackend) ReleaseLock(token string) error
ReleaseLock for a token