Documentation ¶
Index ¶
- Constants
- type AssetLink
- type ControllerInterface
- type DBPatch
- type DatabaseCacheInterface
- type DatabasePersistentInterface
- type DatabaseType
- type FunctionInfo
- type LoggerInterface
- type NetMsg
- type NetworkInterface
- type NodeCfg
- type NodeInfo
- type NodeVersion
- type PackageData
- type ProviderInfo
- type PubsubInterface
- type RequestInfo
- type RespondMsg
- type RuntimeInterface
- type RuntimeOutput
- type YamlAssetPolicy
- type YamlConfigure
- type YamlLogCfg
- type YamlNetworkCfg
- type YamlNetworkPolicy
- type YamlPackageMetaData
- type YamlPolicyCfg
- type YamlRuntimePolicy
Constants ¶
View Source
const ( FeatureStorage = "storage" FeatureFunctionRT = "funtion" FeatureServiceRT = "service" FeatureRegistry = "registry" )
View Source
const (
NotFoundPage = "" /* 1420-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetLink ¶
type AssetLink struct { // Addresses []string // ProviderID string AssetID noid.Identifier Size int64 }
type ControllerInterface ¶
type ControllerInterface interface { Init() error GetFunctionInfo(ID noid.Identifier) (FunctionInfo, error) GetAssetLink(ID noid.Identifier) (string, error) DeployPkg(pkg *multipart.FileHeader) error APIHandler(*http.Request, []string) ([]byte, error) GetNodeVersion() NodeVersion HandleMessage(msg *NetMsg) error Version() int }
type DatabaseCacheInterface ¶
type DatabaseType ¶
type DatabaseType string
const ( DatabasePersistent DatabaseType = "persist" DatabaseCache DatabaseType = "cache" )
type FunctionInfo ¶
type FunctionInfo struct { ID noid.Identifier RuntimeType schema.RuntimeType Local bool Owner string OwnerSig string }
type LoggerInterface ¶
type NetworkInterface ¶
type NetworkInterface interface { Init() error BroadcastMsgToProviders(*NetMsg) error GetProviderAddresses(string) []string GetProviderList() []ProviderInfo SendMsgToClient(*schema.Msg, string) error SendMsgToProvider(*schema.Msg, string) error GetAvailableNodeTypes() []nna.NodeType GetAvailableConnectionTypes() []nna.ConnectionType GetAvailableConnectionProtocolTypes() []nna.ConnectionProtocolType Version() int }
type NodeCfg ¶
type NodeCfg struct { Info *NodeInfo Network NetworkInterface Controler ControllerInterface Runtime RuntimeInterface Pubsub PubsubInterface DBCache DatabaseCacheInterface DBPersistent DatabasePersistentInterface }
type NodeInfo ¶
type NodeInfo struct { ID string Cfg *YamlConfigure }
type NodeVersion ¶
type PackageData ¶
type PackageData struct { MetaData YamlPackageMetaData Files map[string]*zip.File }
type ProviderInfo ¶
type ProviderInfo struct { ProviderID string Addresses []string Version NodeVersion Owner string Reachable bool }
type PubsubInterface ¶
type RequestInfo ¶
type RespondMsg ¶
type RuntimeInterface ¶
type RuntimeInterface interface { Init() error RunFunction(fnLink string, fnType schema.RuntimeType, data []byte) (*RuntimeOutput, error) StartService() error Version() int }
type RuntimeOutput ¶
type YamlAssetPolicy ¶
type YamlAssetPolicy struct { MaxAssetSize uint64 `yaml:"max-asset-size"` Retriever struct { MaxConnPerFile int `yaml:"max-conn-per-file"` MaxConconcurrentRetriever int `yaml:"max-concurrent-retriever"` } `yaml:"retriever"` Uploader struct { MaxConcurrentUploader int `yaml:"max-concurrent-uploader"` } `yaml:"uploader"` }
type YamlConfigure ¶
type YamlConfigure struct { Version int `yaml:"version"` NetworkID int `yaml:"network-id"` Modules []string `yaml:"modules"` Identity string `yaml:"identity"` Owner string `yaml:"owner"` DataDir string `yaml:"datadir"` Debug bool `yaml:"debug"` DebugRuntime bool `yaml:"debug-runtime"` Network YamlNetworkCfg `yaml:"network"` Policy YamlPolicyCfg `yaml:"policy"` Logger YamlLogCfg `yaml:"log-config"` RegistriesDir string `yaml:"registries-dir"` }
type YamlLogCfg ¶
type YamlLogCfg struct { Logger struct { Endpoint string `yaml:"endpoint"` EndpointType string `yaml:"endpoint-type"` } `yaml:"logger"` Functional struct { Enable bool `yaml:"enable"` Endpoint string `yaml:"endpoint"` } `yaml:"functional"` Service struct { Enable bool `yaml:"enable"` Endpoint string `yaml:"endpoint"` } `yaml:"service"` }
type YamlNetworkCfg ¶
type YamlNetworkPolicy ¶
type YamlPackageMetaData ¶
type YamlPolicyCfg ¶
type YamlPolicyCfg struct { AssetPolicy YamlAssetPolicy `yaml:"asset"` RuntimePolicy YamlRuntimePolicy `yaml:"runtime"` NetworkPolicy YamlNetworkPolicy `yaml:"network"` }
Click to show internal directories.
Click to hide internal directories.