tokenjar

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

implements a token jar that stores tokens into memory, and potentially a file on the file system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c Config) (*tokenjar, error)

Create a new tokenjar, with the specified path. If the path is empty, the tokenjar will be in-memory only.

Types

type Config

type Config struct {
	DataPath      string        `hcl:"datapath" description:"Path to persistent data"`
	WriteInterval time.Duration `hcl:"write-interval" description:"Interval to write data to disk"`
}

func (Config) Description

func (Config) Description() string

Description returns the description of the service

func (Config) Name

func (Config) Name() string

Name returns the name of the service

func (Config) New

func (c Config) New() (server.Task, error)

Create a new task from the configuration

Jump to

Keyboard shortcuts

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