config

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLocalNetworkURL       = &url.URL{Scheme: "https", Host: "127.0.0.1:54321"}
	DefaultLocalNetworkBind      = &url.URL{Scheme: "https", Host: "0.0.0.0:54321"}
	DefaultLocalNetworkCache     = "gcache:?type=lru&size=100&expire=3s"
	DefaultLocalNetworkSealCache = "gcache:?type=lru&size=10000&expire=3m"
)
View Source
var (
	DefaultDatabaseURI   = "mongodb://127.0.0.1:27017/mitum"
	DefaultDatabaseCache = fmt.Sprintf(
		"gcache:?type=%s&size=%d&expire=%s",
		cache.DefaultGCacheType,
		cache.DefaultGCacheSize,
		cache.DefaultCacheExpire.String(),
	)
	DefaultDatabaseCacheURL *url.URL
)

Functions

This section is empty.

Types

type BaseDatabase

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

func (BaseDatabase) Cache

func (no BaseDatabase) Cache() *url.URL

func (*BaseDatabase) SetCache

func (no *BaseDatabase) SetCache(s string) error

func (*BaseDatabase) SetURI

func (no *BaseDatabase) SetURI(s string) error

func (BaseDatabase) URI

func (no BaseDatabase) URI() *url.URL

type BaseLocalNetwork

type BaseLocalNetwork struct {
	*BaseNodeNetwork
	// contains filtered or unexported fields
}

func EmptyBaseLocalNetwork

func EmptyBaseLocalNetwork() *BaseLocalNetwork

func (BaseLocalNetwork) Bind

func (no BaseLocalNetwork) Bind() *url.URL

func (BaseLocalNetwork) Cache

func (no BaseLocalNetwork) Cache() *url.URL

func (BaseLocalNetwork) Certs

func (no BaseLocalNetwork) Certs() []tls.Certificate

func (BaseLocalNetwork) SealCache

func (no BaseLocalNetwork) SealCache() *url.URL

func (*BaseLocalNetwork) SetBind

func (no *BaseLocalNetwork) SetBind(s string) error

func (*BaseLocalNetwork) SetCache

func (no *BaseLocalNetwork) SetCache(s string) error

func (*BaseLocalNetwork) SetCerts

func (no *BaseLocalNetwork) SetCerts(certs []tls.Certificate) error

func (*BaseLocalNetwork) SetSealCache

func (no *BaseLocalNetwork) SetSealCache(s string) error

type BaseNodeNetwork

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

func EmptyBaseNodeNetwork

func EmptyBaseNodeNetwork() *BaseNodeNetwork

func (BaseNodeNetwork) ConnInfo

func (no BaseNodeNetwork) ConnInfo() util.HTTPConnInfo

func (*BaseNodeNetwork) SetConnInfo

func (no *BaseNodeNetwork) SetConnInfo(c util.HTTPConnInfo) error

type Database

type Database interface {
	URI() *url.URL
	SetURI(string) error
	Cache() *url.URL
	SetCache(string) error
}

type DatabaseYAML

type DatabaseYAML struct {
	URI   string `yaml:",omitempty"`
	Cache string `yaml:",omitempty"`
}

type LocalNetwork

type LocalNetwork interface {
	ConnInfo() util.HTTPConnInfo
	SetConnInfo(util.HTTPConnInfo) error
	Bind() *url.URL
	SetBind(string) error
	Certs() []tls.Certificate
	SetCerts([]tls.Certificate) error
	Cache() *url.URL
	SetCache(string) error
	SealCache() *url.URL
	SetSealCache(string) error
}

Jump to

Keyboard shortcuts

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