Interface INodeSshProxy
Used to reference node proxy common properties.
Namespace: Neon.Kube.SSH
Assembly: Neon.Kube.dll
Syntax
public interface INodeSshProxy
Properties
Role
Returns the node role, one of the NodeRole identifying what the node does.
This may also return null
.
Declaration
string Role { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
GetIdempotentState(string)
Indicates whether an idempotent action has been completed.
Declaration
bool GetIdempotentState(string actionId)
Parameters
Type | Name | Description |
---|---|---|
string | actionId | The action ID. |
Returns
Type | Description |
---|---|
bool |
|
GetLog()
Returns the current log for the node.
Declaration
NodeLog GetLog()
Returns
Type | Description |
---|---|
NodeLog | A NodeLog. |
InvokeIdempotent(string, Action)
Invokes a named action on the node if it has never been been performed on the node before.
Declaration
bool InvokeIdempotent(string actionId, Action action)
Parameters
Type | Name | Description |
---|---|---|
string | actionId | The node-unique action ID. |
Action | action | The action to be performed. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
actionId
must uniquely identify the action on the node.
This may include letters, digits, dashes and periods as well as one or
more forward slashes that can be used to organize idempotent status files
into folders.
This method tracks successful action completion by creating a file on the node at State/ACTION-ID. To ensure idempotency, this method first checks for the existence of this file and returns immediately without invoking the action if it is present.
InvokeIdempotentAsync(string, Func<Task>)
Invokes a named action asynchronously on the node if it has never been been performed on the node before.
Declaration
Task<bool> InvokeIdempotentAsync(string actionId, Func<Task> action)
Parameters
Type | Name | Description |
---|---|---|
string | actionId | The node-unique action ID. |
Func<Task> | action | The asynchronous action to be performed. |
Returns
Type | Description |
---|---|
Task<bool> |
|
Remarks
actionId
must uniquely identify the action on the node.
This may include letters, digits, dashes and periods as well as one or
more forward slashes that can be used to organize idempotent status files
into folders.
This method tracks successful action completion by creating a file on the node at State/ACTION-ID. To ensure idempotency, this method first checks for the existence of this file and returns immediately without invoking the action if it is present.
SetIdempotentState(string)
Explicitly indicates that an idempotent action has been completed on the node.
Declaration
void SetIdempotentState(string actionId)
Parameters
Type | Name | Description |
---|---|---|
string | actionId | The action ID. |