22 lines
691 B
Go
22 lines
691 B
Go
// -*- Mode: Go; indent-tabs-mode: t -*-
|
|
//
|
|
// Copyright (C) 2020 IOTech Ltd
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package container
|
|
|
|
import (
|
|
"github.com/edgexfoundry/go-mod-bootstrap/v4/di"
|
|
|
|
"github.com/edgexfoundry/device-sdk-go/v4/internal/config"
|
|
)
|
|
|
|
// ConfigurationName contains the name of device service's ConfigurationStruct implementation in the DIC.
|
|
var ConfigurationName = di.TypeInstanceToName(config.ConfigurationStruct{})
|
|
|
|
// ConfigurationFrom helper function queries the DIC and returns device service's ConfigurationStruct implementation.
|
|
func ConfigurationFrom(get di.Get) *config.ConfigurationStruct {
|
|
return get(ConfigurationName).(*config.ConfigurationStruct)
|
|
}
|