Documentation ¶
Index ¶
- Constants
- func CreatePrefix(prefix, target string) (*gnmi.Path, error)
- func GetHost(hostport string) string
- func GnmiPathToXPath(p *gnmi.Path, noKeys bool) string
- func MergeMaps(dst, src map[string]interface{}) map[string]interface{}
- func NewTLSConfig(ca, cert, key string, skipVerify, genSelfSigned bool) (*tls.Config, error)
- func ParsePath(p string) (*gnmi.Path, error)
- func PathElems(pf, p *gnmi.Path) []*gnmi.PathElem
- func ReadFile(ctx context.Context, path string) ([]byte, error)
- func SelfSignedCerts() (tls.Certificate, error)
Constants ¶
const (
DefaultLoggingFlags = log.LstdFlags | log.Lmicroseconds | log.Lmsgprefix
)
Variables ¶
This section is empty.
Functions ¶
func CreatePrefix ¶ added in v0.18.0
CreatePrefix //
func NewTLSConfig ¶ added in v0.18.0
NewTLSConfig generates a *tls.Config based on given CA, certificate, key files and skipVerify flag if certificate and key are missing a self signed key pair is generated. The certificates paths can be local or remote, http(s) and (s)ftp are supported for remote files.
func ParsePath ¶ added in v0.18.0
ParsePath creates a gnmi.Path out of a p string, check if the first element is prefixed by an origin, removes it from the xpath and adds it to the returned gnmiPath
func ReadFile ¶ added in v0.20.1
ReadFile reads a local or remote file and returns the read bytes, the location of the file is determined based on its prefix, http(s), (s)ftp prefixes are supported. no prefix means the file is local. `-` means stdin.
func SelfSignedCerts ¶ added in v0.18.0
func SelfSignedCerts() (tls.Certificate, error)
Types ¶
This section is empty.