Documentation ¶
Overview ¶
Container dedicated implementation for the API service Node of Perinets unified API. It provides node specific meta information, general funding configuration values like application_name and element_name as well as production information
Index ¶
- Constants
- Variables
- func LifeStateSet(w http.ResponseWriter, r *http.Request)
- func NodeConfigGet(w http.ResponseWriter, r *http.Request)
- func NodeConfigSet(w http.ResponseWriter, r *http.Request)
- func NodeInfoGet(w http.ResponseWriter, r *http.Request)
- func ProductionInfoGet(w http.ResponseWriter, r *http.Request)
- func ProductionInfoSet(w http.ResponseWriter, r *http.Request)
- func ServicesGet(w http.ResponseWriter, r *http.Request)
- func ServicesSet(w http.ResponseWriter, r *http.Request)
- func SetServiceConfig(serviceConfig ServiceConfig)
- func StatusReset(w http.ResponseWriter, r *http.Request)
- func StatusSet(w http.ResponseWriter, r *http.Request)
- type ContainerMetaInfo
- type FirmwareInfo
- type NodeConfig
- type NodeInfo
- type PathInfo
- type ProductionInfo
- type ServiceConfig
Constants ¶
View Source
const (
API_VERSION = "23"
)
Variables ¶
View Source
var NodeLifeState = struct { PRODUCTION string OEM string UPDATED string }{ "PRODUCTION", "OEM", "UPDATED", }
LifeCycle State of a node enumerator
var state = NodeLifeState.PRODUCED
Functions ¶
func LifeStateSet ¶
func LifeStateSet(w http.ResponseWriter, r *http.Request)
func NodeConfigGet ¶
func NodeConfigGet(w http.ResponseWriter, r *http.Request)
func NodeConfigSet ¶
func NodeConfigSet(w http.ResponseWriter, r *http.Request)
func NodeInfoGet ¶
func NodeInfoGet(w http.ResponseWriter, r *http.Request)
func ProductionInfoGet ¶
func ProductionInfoGet(w http.ResponseWriter, r *http.Request)
func ProductionInfoSet ¶
func ProductionInfoSet(w http.ResponseWriter, r *http.Request)
func ServicesGet ¶
func ServicesGet(w http.ResponseWriter, r *http.Request)
func ServicesSet ¶
func ServicesSet(w http.ResponseWriter, r *http.Request)
func SetServiceConfig ¶
func SetServiceConfig(serviceConfig ServiceConfig)
func StatusReset ¶
func StatusReset(w http.ResponseWriter, r *http.Request)
Types ¶
type ContainerMetaInfo ¶
type FirmwareInfo ¶
type NodeConfig ¶
type NodeInfo ¶
type NodeInfo struct { ApiVersion json.Number `json:"api_version"` Config *NodeConfig `json:"config"` LifeState string `json:"life_state"` Services []string `json:"services"` Status string `json:"status"` Firmware FirmwareInfo `json:"firmware"` }
NodeInfo - Basic Node information
type PathInfo ¶
type PathInfo = httpserver.PathInfo
type ProductionInfo ¶
type ProductionInfo struct { Manufacturer string `json:"manufacturer"` // Manufacturer Part Number Mpn string `json:"mpn"` SerialNumber string `json:"serial_number"` ProductVersion string `json:"product_version"` ProductVariant string `json:"product_variant"` // Manufacturer production batch identification BatchNumber string `json:"batch_number"` ProductName string `json:"product_name"` Country string `json:"country"` Hostname string `json:"hostname"` }
type ServiceConfig ¶
type ServiceConfig struct { FirmwareInfo FirmwareInfo StorageBasePath string NodeEventCallback func() }
Click to show internal directories.
Click to hide internal directories.