metadata

package
v0.0.0-...-7b61fee Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

README

EdgeX Foundry Core Metadata Service

license

Metadata retains and provides access to the knowledge about the devices and sensors connected to EdgeX and how to communicate with them. More specifically,it manages information about the devices and sensors connected to, and operated by, EdgeX Foundry, knows the type, and organization of data reported by the devices and sensors, and it knows how to command the devices and sensors. This service may also hold and manage other configuration metadata used by other services on the gateway – such as clean up schedules, hardware configuration (Wi-Fi connection info, MQTT queues, etc.). Non-device metadata may need to be held in a different database and/or managed by another service – depending on implementation.

Install and Deploy Native

Prerequisites

Serveral EdgeX Foundry services depend on ZeroMQ for communications by default. The easiest way to get and install ZeroMQ is to use or follow the following setup script: https://gist.github.com/katopz/8b766a5cb0ca96c816658e9407e83d00.

Note: Setup of the ZeroMQ library is not supported on Windows plaforms.

Installation and Execution

To fetch the code and build the microservice execute the following:

cd $GOPATH/src
go get github.com/Circutor/edgex
cd $GOPATH/src/github.com/Circutor/edgex
# pull the 3rd party / vendor packages
make prepare
# build the microservice
make cmd/core-metadata/core-metadata
# get to the core metadata microservice executable
cd cmd/core-metadata
# run the microservice (may require other dependent services to run correctly)
./core-metadata

Community

License

Apache-2.0

Documentation

Overview

******************************************************************************

  • Copyright 2018 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2018 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc.
  • Copyright (c) 2019 Intel Corporation *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

View Source
const (
	/* ---------------- URL PARAM NAMES -----------------------*/
	ID                  = "id"
	NAME                = "name"
	OPSTATE             = "opstate"
	URLADMINSTATE       = "adminstate"
	ADMINSTATE          = "adminState"
	URLLASTREPORTED     = "lastreported"
	LASTREPORTED        = "lastReported"
	LASTREPORTEDNOTIFY  = "lastreportednotify"
	URLLASTCONNECTED    = "lastconnected"
	LASTCONNECTED       = "lastConnected"
	LASTCONNECTEDNOTIFY = "lastconnectednotify"
	ADDRESSABLE         = "addressable"
	ADDRESSABLENAME     = "addressablename"
	ADDRESSABLEID       = "addressableid"
	CHECK               = "check"
	SERVICE             = "service"
	SERVICENAME         = "servicename"
	SERVICEID           = "serviceid"
	LABEL               = "label"
	PROFILE             = "profile"
	PROFILEID           = "profileid"
	PROFILENAME         = "profilename"
	DEVICEPROFILE       = "deviceprofile"
	UPLOADFILE          = "uploadfile"
	UPLOAD              = "upload"
	MODEL               = "model"
	MANUFACTURER        = "manufacturer"
	YAML                = "yaml"
	DEVICENAME          = "devicename"
	DEVICESERVICE       = "deviceservice"
	TOPIC               = "topic"
	PORT                = "port"
	PUBLISHER           = "publisher"
	ADDRESS             = "address"
	COMMAND             = "command"
	DEVICE              = "device"
	PROVISIONWATCHER    = "provisionwatcher"
	IDENTIFIER          = "identifier"
	KEY                 = "key"
	VALUE               = "value"
	VALUEDESCRIPTORSFOR = "valueDescriptorsFor"
	UNLOCKED            = "UNLOCKED"
	ENABLED             = "ENABLED"
)

Variables

View Source
var (
	ErrFailedReadProf       = errors.New("Could not read profiles from database")
	ErrProfLimitExceed      = errors.New("Profiles limit exceeded")
	ErrVarsLimitExceed      = errors.New("Variables per profile limit exceeded")
	ErrCmdLimitExceed       = errors.New("Commands per profile limit exceeded")
	ErrVarPerCmdLimitExceed = errors.New("Variables per commands limit exceeded")
)
View Source
var LoggingClient logger.LoggingClient

Functions

func Destruct

func Destruct()

func Init

func Init() bool

func LoadRestRoutes

func LoadRestRoutes() *mux.Router

func Retry

func Retry(useProfile string, timeout int, wait *sync.WaitGroup, ch chan error)

Types

type ConfigurationStruct

type ConfigurationStruct struct {
	Writable      WritableInfo
	Clients       map[string]config.ClientInfo
	Databases     map[string]config.DatabaseInfo
	Logging       config.LoggingInfo
	Notifications config.NotificationInfo
	Service       config.ServiceInfo
}

Struct used to parse the JSON configuration file

var Configuration *ConfigurationStruct

Global variables

type WritableInfo

type WritableInfo struct {
	LogLevel string
}

Directories

Path Synopsis
****************************************************************************** * Copyright 2018 Dell Inc.
****************************************************************************** * Copyright 2018 Dell Inc.
****************************************************************************** * Copyright 2017 Dell Inc.
****************************************************************************** * Copyright 2017 Dell Inc.

Jump to

Keyboard shortcuts

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