Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConnection ¶
func CheckConnection(ctx context.Context, c Connectable, cc ConnectionConfig) error
CheckConnection checks the gRPC connection of a connectable
Types ¶
type Connectable ¶
type Connectable interface { // GetAddress returns the target address for the connection GetAddress() ident.Address // GetConnection returns a current gRCP connection (for checking) GetConnection() *grpc.ClientConn // SetConnection replaces the connection of the device (any existing connection will be closed prior to this) SetConnection(*grpc.ClientConn) }
Connectable is anything which holds a gRPC connection
type ConnectionConfig ¶
type ConnectionConfig interface { // GetTimeout returns the timeout for dialing a new connection GetTimeout() time.Duration }
ConnectionConfig configures the opperation of the connection operations
func NewConnectionConfig ¶
func NewConnectionConfig(timeout time.Duration) ConnectionConfig
Click to show internal directories.
Click to hide internal directories.