kuksa_client

package
v0.0.0-...-a8c3383 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT = 1 * time.Second
)

Variables

This section is empty.

Functions

func GetArrayFromInput

func GetArrayFromInput[T any](input string) ([]T, error)

func ReadConfig

func ReadConfig(config *KuksaClientConfig)

Types

type FieldView

type FieldView struct {
	Field grpcpb.Field
	View  grpcpb.View
}

type KuksaBackend

type KuksaBackend interface {
	ConnectToKuksaVal() error
	Close()
	AuthorizeKuksaValConn(TokenOrTokenfile string) error
	GetValueFromKuksaVal(path string, attr string) ([]interface{}, error)
	SetValueFromKuksaVal(path string, value string, attr string) error
	SubscribeFromKuksaVal(path string, attr string) (string, error)
	UnsubscribeFromKuksaVal(id string) error
	PrintSubscriptionMessages(id string) error
	GetMetadataFromKuksaVal(path string) ([]interface{}, error)
}

type KuksaClientCommGrpc

type KuksaClientCommGrpc struct {
	Config *KuksaClientConfig
	// contains filtered or unexported fields
}

func (*KuksaClientCommGrpc) AuthorizeKuksaValConn

func (cg *KuksaClientCommGrpc) AuthorizeKuksaValConn(TokenOrTokenfile string) error

Function to authorize to kuksa.val server

func (*KuksaClientCommGrpc) Close

func (cg *KuksaClientCommGrpc) Close()

Close the Kuksa Client

func (*KuksaClientCommGrpc) ConnectToKuksaVal

func (cg *KuksaClientCommGrpc) ConnectToKuksaVal() error

func (*KuksaClientCommGrpc) GetMetadataFromKuksaVal

func (cg *KuksaClientCommGrpc) GetMetadataFromKuksaVal(path string) ([]interface{}, error)

Function to get metadata from kuksa.val server

func (*KuksaClientCommGrpc) GetValueFromKuksaVal

func (cg *KuksaClientCommGrpc) GetValueFromKuksaVal(path string, attr string) ([]interface{}, error)

Function to get attribute value from databroker

func (*KuksaClientCommGrpc) PrintSubscriptionMessages

func (cg *KuksaClientCommGrpc) PrintSubscriptionMessages(id string) error

func (*KuksaClientCommGrpc) SetValueFromKuksaVal

func (cg *KuksaClientCommGrpc) SetValueFromKuksaVal(path string, value string, attr string) error

func (*KuksaClientCommGrpc) SubscribeFromKuksaVal

func (cg *KuksaClientCommGrpc) SubscribeFromKuksaVal(path string, attr string) (string, error)

func (*KuksaClientCommGrpc) UnsubscribeFromKuksaVal

func (cg *KuksaClientCommGrpc) UnsubscribeFromKuksaVal(id string) error

type KuksaClientCommWs

type KuksaClientCommWs struct {
	Config *KuksaClientConfig
	// contains filtered or unexported fields
}

func (*KuksaClientCommWs) AuthorizeKuksaValConn

func (cc *KuksaClientCommWs) AuthorizeKuksaValConn(TokenOrTokenfile string) error

Function to authorize to kuksa.val server

func (*KuksaClientCommWs) Close

func (cc *KuksaClientCommWs) Close()

func (*KuksaClientCommWs) ConnectToKuksaVal

func (cc *KuksaClientCommWs) ConnectToKuksaVal() error

Function to connect to kuksa.val

func (*KuksaClientCommWs) GetMetadataFromKuksaVal

func (cc *KuksaClientCommWs) GetMetadataFromKuksaVal(path string) ([]interface{}, error)

Function to get metadata from kuksa.val server

func (*KuksaClientCommWs) GetValueFromKuksaVal

func (cc *KuksaClientCommWs) GetValueFromKuksaVal(path string, attr string) ([]interface{}, error)

Function to get attribute value from VSS tree

func (*KuksaClientCommWs) PrintSubscriptionMessages

func (cc *KuksaClientCommWs) PrintSubscriptionMessages(id string) error

func (*KuksaClientCommWs) SetValueFromKuksaVal

func (cc *KuksaClientCommWs) SetValueFromKuksaVal(path string, value string, attr string) error

Function to set value from VSS tree

func (*KuksaClientCommWs) SubscribeFromKuksaVal

func (cc *KuksaClientCommWs) SubscribeFromKuksaVal(path string, attr string) (string, error)

Function to subscribe attribute value from VSS tree

func (*KuksaClientCommWs) UnsubscribeFromKuksaVal

func (cc *KuksaClientCommWs) UnsubscribeFromKuksaVal(id string) error

Function to unsubscribe value from VSS tree

type KuksaClientConfig

type KuksaClientConfig struct {
	ServerAddress     string `mapstructure:"serverAddress"`
	ServerPort        string `mapstructure:"serverPort"`
	Insecure          bool   `mapstructure:"insecure"`
	CertsDir          string `mapstructure:"certsDir"`
	TokenOrTokenfile  string `mapstructure:"TokenOrTokenfile"`
	TransportProtocol string `mapstructure:"protocol"`
}

func (KuksaClientConfig) String

func (config KuksaClientConfig) String() string

type ParseError

type ParseError struct{}

func (ParseError) Error

func (e ParseError) Error() string

Jump to

Keyboard shortcuts

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