inmem

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package inmem implements a layer of services in memory using purely Go constructs. In theory, they can be swapped out for services implemented using other tech, e.g. databases, redis, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(config CacheConfig) (*bigcache.BigCache, error)

Types

type CacheConfig

type CacheConfig struct {
	// Total capacity of cache in MB.
	Size int
	// Time-to-live for each cache entry before automatic deletion.
	TTL time.Duration
}

type CloudService

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

func NewCloudService

func NewCloudService(configs ...cloud.Config) (*CloudService, error)

func NewCloudServiceWithDefaults

func NewCloudServiceWithDefaults() *CloudService

func (*CloudService) GetCloudConfig

func (cs *CloudService) GetCloudConfig(name string) (cloud.Config, error)

func (*CloudService) ListCloudConfigs

func (cs *CloudService) ListCloudConfigs() []cloud.Config

Jump to

Keyboard shortcuts

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