config

package
v0.0.0-...-664f50f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthType_StorageKey = "storage-key"
)

Variables

View Source
var CosmosDbAdditionalHeaders = map[string]string{
	"MaxDataServiceVersion": "3.0;NetFx",
	"DataServiceVersion":    "3.0",
}

Functions

This section is empty.

Types

type AuthStorageKey

type AuthStorageKey struct {
	//TODO account secondary key
	AccountPrimaryKey         string
	RevisionAccountPrimaryKey string
	ConnectionString          string
	RevisionConnectionString  string
	EndpointSuffix            string
	RevisionEndpointSuffix    string
}

type Config

type Config struct {
	ListenAddress string
	UseTlS        bool
	AuthType      string

	AccountName string
	TableName   string
	StorageKey  AuthStorageKey

	// RevisionAccountName is the account name for revision table
	RevisionAccountName string
	// RevisionTableName is the table name to use for revision
	// if not set, will default to the table name
	RevisionTableName string
	// RevisionStorageKey is the storage key required to access
	// revision table
	RevisionStorageKey AuthStorageKey
	UseRevisionTable   bool

	TLSConfig TLSConfig

	// max in memory cached events
	MaxEventCount int

	Runtime Runtime
}

func NewConfig

func NewConfig() *Config

func (*Config) InitRuntime

func (c *Config) InitRuntime() error

func (*Config) Validate

func (c *Config) Validate() error

type Runtime

type Runtime struct {
	Done chan struct{}
	// Important: don't interact with this channel
	// except in tests to close to the entire runtime
	Stop                  chan os.Signal
	Context               context.Context
	StorageClient         storage.Client
	TableClient           storage.TableServiceClient
	StorageTable          *storage.Table
	RevisionStorageClient storage.Client
	RevisionTableClient   storage.TableServiceClient
	RevisionStorageTable  *storage.Table
}

type TLSConfig

type TLSConfig struct {
	CertFilePath  string
	KeyFilePath   string
	TrustedCAFile string
}

Jump to

Keyboard shortcuts

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