secret

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Backend drkey.SecretValueDB
	Metrics *Metrics
}

func (*Database) Close

func (db *Database) Close() error

func (*Database) DeleteExpiredValues

func (db *Database) DeleteExpiredValues(ctx context.Context, cutoff time.Time) (int, error)

func (*Database) GetValue

func (db *Database) GetValue(ctx context.Context,
	meta drkey.SecretValueMeta, asSecret []byte) (drkey.SecretValue, error)

func (*Database) InsertValue

func (db *Database) InsertValue(ctx context.Context,
	proto drkey.Protocol, epoch drkey.Epoch) error

func (*Database) SetMaxIdleConns

func (db *Database) SetMaxIdleConns(maxIdleConns int)

func (*Database) SetMaxOpenConns

func (db *Database) SetMaxOpenConns(maxOpenConns int)

type Metrics

type Metrics struct {
	QueriesTotal func(op, result string) metrics.Counter
}

func (*Metrics) Observe

func (m *Metrics) Observe(ctx context.Context, op string, action func(context.Context) error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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