Connection management.
{ host : String
, username : String
, secret : String
, authType : AuthType
, sshPort : String
, netconfPort : String
}
Everything needed to connect to a protocol peer.
host
: IP address or hostname of the peerusername
: username for authenticationsecret
: either a plaintext password, or the pathame of a file on the
EnTrance server containing an ssh keyauthType
: which of the password/ssh key options should be usedsshPort
: which port to connect to on the peer for ssh operationsnetconfPort
: which port to connect to on the peer for Netconf operationsIf you aren't going to use eg Netconf, then it doesn't matter what value is
provided for netconfPort
.
Whether the secret
part of Params
should be interpreted as a password,
or a pathname for a file on the EnTrance server containing an ssh key.
Abstracted description of the state of protocol connection. Later
constructors are considered "worse" than earlier (eg FailedToConnect
is worse
than Connected
) when multiple connection states are aggregated via target
groups.
The states involving failure include a String
giving more details.
{ groupState : State
, childName : String
, childState : State
, timestamp : String
}
An aggregate state notification received for a target, or target group. You receive one of these when you used SubscribeToConState when starting a target or target group, and one of the underlying connections just changed state.
groupState
: the new overall connection statechildName
: the name of the child whose state just changedchildState
: the new state of the changed childtimestamp
: a "HH:MM:SS" string giving a timestampdecodeState : Json.Decode.Decoder State
JSON decoder for connection state.
decodeGroupState : (GroupState -> msg) -> Json.Decode.Decoder msg
JSON decoder for GroupState. Takes a message constructor.
decodeParams : Json.Decode.Decoder Params
JSON decoder for connection params.
encodeParams : Params -> Json.Encode.Value
JSON encoder for Params. This can be handy for, eg, persisting connection settings.