Documentation
¶
Index ¶
- Constants
- Variables
- func DiffEnvStores(initial, updated *EnvStoreMap) (newOrUpdated, unchanged, deleted []string)
- func NewSessionList() *lru.Cache[*Session]
- func SplitEnv(str string) (string, string)
- type EnvStore
- type EnvStoreMap
- func (s *EnvStoreMap) Delete(ctx context.Context, k string) error
- func (s *EnvStoreMap) Get(k string) (string, bool)
- func (s *EnvStoreMap) Items() ([]string, error)
- func (s *EnvStoreMap) Load(source string, envs ...string) error
- func (s *EnvStoreMap) Merge(ctx context.Context, envs ...string) error
- func (s *EnvStoreMap) Set(ctx context.Context, k, v string) error
- type Session
- type SessionOption
Constants ¶
View Source
const ( MaxEnvSizeInBytes = 128*1024 - 128 MaxEnvironSizeInBytes = MaxEnvSizeInBytes * 8 )
View Source
const SessionListCapacity = 1024
SessionListCapacity is a maximum number of sessions stored in a single SessionList.
Variables ¶
View Source
var ErrEnvTooLarge = errors.New("env too large")
Functions ¶
func DiffEnvStores ¶
func DiffEnvStores(initial, updated *EnvStoreMap) (newOrUpdated, unchanged, deleted []string)
func NewSessionList ¶
Types ¶
type EnvStoreMap ¶
type EnvStoreMap struct {
// contains filtered or unexported fields
}
func NewEnvStore ¶
func NewEnvStore() *EnvStoreMap
func (*EnvStoreMap) Items ¶
func (s *EnvStoreMap) Items() ([]string, error)
type Session ¶
type Session struct {
ID string
// contains filtered or unexported fields
}
Session is an object which lifespan contains multiple executions. It's used to exchange information between executions. Currently, it only keeps track of environment variables.
func New ¶
func New(opts ...SessionOption) (*Session, error)
func New(owl bool, proj *project.Project, seedEnv []string) (*Session, error) {
type SessionOption ¶
type SessionOption func(*sessionFactory) *sessionFactory
func WithOwl ¶
func WithOwl(owl bool) SessionOption
func WithProject ¶
func WithProject(proj *project.Project) SessionOption
func WithSeedEnv ¶
func WithSeedEnv(seedEnv []string) SessionOption
Click to show internal directories.
Click to hide internal directories.