provider

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

This file needs a better name

Index

Constants

View Source
const (
	//Provider keys
	ViperKey = "viper"
	InMemKey = "in-mem"
)
View Source
const (
	FilePath = "filepath"
	FileType = "filetype"
	FileName = "filename"
)

Variables

This section is empty.

Functions

func NewInMem

func NewInMem(opts Options) (config.Handler, error)

NewInMem intializes an in-memory instance for config

func NewViper

func NewViper(opts Options) (config.Handler, error)

Types

type InMem

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

InMem instance for configuration

func (*InMem) GetKey

func (l *InMem) GetKey(key string) string

GetKey gets a key value from local store

func (*InMem) GetObject

func (l *InMem) GetObject(key string, result interface{}) error

GetObject gets an object value for the key

func (*InMem) SetKey

func (l *InMem) SetKey(key string, value string)

SetKey sets a key value in local store

type Options

type Options struct {
	ServerConfig   map[string]string
	MeshSpec       map[string]string
	MeshInstance   map[string]string
	ProviderConfig map[string]string
	Operations     adapter.Operations
}

type Viper

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

func (*Viper) GetKey

func (v *Viper) GetKey(key string) string

func (*Viper) GetObject

func (v *Viper) GetObject(key string, result interface{}) error

func (*Viper) SetKey

func (v *Viper) SetKey(key string, value string)

Jump to

Keyboard shortcuts

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