store

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements Store and Cache using taubyte acme service NOTE: Must periodically chewck the validity of the certificate by a go-routine. If

the certififcate is not valid restart the service after a random sleep.

func New

func New(ctx context.Context, node peer.Node, cacheDir string, errCacheMiss error) (*Store, error)

func (*Store) Delete

func (d *Store) Delete(ctx context.Context, name string) error

Delete removes the specified certificate or tokens (cached data).

func (*Store) Get

func (d *Store) Get(ctx context.Context, name string) ([]byte, error)

Get reads a certificate data from the specified file name.

func (*Store) Put

func (d *Store) Put(ctx context.Context, name string, data []byte) error

Put writes the certificate data to the specified file name. The file will be created with 0600 permissions.

Jump to

Keyboard shortcuts

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