Services
- HubClientService: The hub client of the node hosting the grpc api. So if you're connecting to the grpc api of a nanoping client, this
service will be used to on behalf of the nanoping client which then will be the node in question when calling the
methods.
- HubServerService: If the grpc hosting node is connected to a hub server, or if the node is hosting the hub server, this service can be
used to get the information about the nodes connected to the hub server.
- LoggingService: The logging service is used to get the log message produced by the services running on a node. The logging service
is running on every node connected to the hub. So a node id is required for every method call to specify the node
that the request is intended for.
- Blueprints: The blueprint service allows to fetch, create, modify and delete blueprints.
- NetworkInstances: The network instance service is to fetch network instances and information about their associated pipelines. Network
instances cannot be created, edited, or deleted by the API. Network instances is managed by the associated Network
and the instances is created automatically by the network whenever a node is included in the Network configuration.
- Networks: The network service allows to fetch, create, modify and delete networks.
- PipelinesService: The pipelines service is used to manage the pipelines of a node hosting the service, such as the nanoping client. The
service can be used to create, update, delete, start, and stop pipelines. The service also provides the ability to
to fetch logs and telemetry data of pipeline runs. Since this service runs on multiple nodes, every method requires
the node_id of the node that the request is intended for.
- ResourcesService: The resources service is used to get the metrics of the system a node is running on. The metrics include things such
as CPU usage, memory, storage, etc. The service is running on every node connected to the hub. So a node id is
required for every method call to specify the node that the request is intended for.
ConfigService
Source: config.proto
DefaultNetworkCarrier
DefaultNetworkCarrierAddress
| Field | Type | Label | Description |
|---|
| ip | string | | |
| port | uint32 | | |
| external_ip | string | | |
DefaultNetworkCarriers
GetDefaultNetworkCarriersRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
GetDefaultNetworkCarriersResponse
SetDefaultNetworkCarriersRequest
SetDefaultNetworkCarriersResponse
HubClientService
Source: hub_client.proto
The hub client of the node hosting the grpc api. So if you're connecting to the grpc api of a nanoping client, this
service will be used to on behalf of the nanoping client which then will be the node in question when calling the
methods.
AuthenticateByRequestRequest
| Field | Type | Label | Description |
|---|
| hub_server_address | string | | Http/https address of the hub server. Example: http://localhost:8769 |
AuthenticateByRequestResponse
DisconnectRequest
DisconnectResponse
GetLocalNodeIdRequest
GetLocalNodeIdResponse
| Field | Type | Label | Description |
|---|
| node_id | string | | The hub node id of the node hosting the grpc api. |
| is_authenticated | bool | | True if the node is authenticated to a hub server. |
GetNodeRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The id of the node to get information about. |
GetNodeResponse
| Field | Type | Label | Description |
|---|
| node | Node | | The node information about the node hosting the grpc api. |
SetNodeRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The id of the node to set information about. |
| name | string | | The name of the node |
| metadata | NodeMetadata | | The metadata of the node |
SetNodeResponse
| Field | Type | Label | Description |
|---|
| node | Node | | The local node information |
StreamConnectionStateRequest
StreamConnectionStateResponse
ConnectionState
| Name | Number | Description |
|---|
| UNAUTHENTICATED | 0 | The node is not authenticated to the hub server. |
| DISCONNECTED | 1 | The node is connected to the hub server. |
| CONNECTED | 2 | The node is disconnected from the hub server. |
Node
| Field | Type | Label | Description |
|---|
| id | string | | Unique id of the node. |
| name | string | | Human readable name of the node. |
| online | bool | | If the node is currently online and connected to the hub server. |
| services | NodeService | repeated | Services accessible on the node. |
| metadata | NodeMetadata | | Metadata of the node. |
NodeMetadata.ItemsEntry
| Field | Type | Label | Description |
|---|
| bytes_value | bytes | | |
| string_value | string | | |
| int_value | int64 | | |
| uint_value | uint64 | | |
| double_value | double | | |
| float_value | float | | |
| bool_value | bool | | |
NodeService
Types of services.
| Name | Number | Description |
|---|
| HUB_SERVER | 0 | |
| RESOURCES | 1 | |
| LOGGING | 2 | |
| PIPELINES | 3 | |
HubServerService
Source: hub_server.proto
If the grpc hosting node is connected to a hub server, or if the node is hosting the hub server, this service can be
used to get the information about the nodes connected to the hub server.
AuthenticationByRequestAnswer
| Field | Type | Label | Description |
|---|
| request_id | uint64 | | The request id of the authentication by request. |
| accept | bool | | Accept or reject the authentication by request. |
AuthenticationByRequestRequest
| Field | Type | Label | Description |
|---|
| node | Node | | The node information about the node that sent the authentication by request. |
| request_id | uint64 | | The request id of the authentication by request. |
GetNodesRequest
Request to get the nodes connected to the hub server. All filters given works in combination as an 'AND' operation.
| Field | Type | Label | Description |
|---|
| metadata_filters | GetNodesRequest.MetadataFiltersEntry | repeated | Will filter the nodes by the given metadata filters. If more than one filter is added the combination will act as an 'AND' operation. So if two or more filters is used, all the filters must match for a node to be included in the response. These filters are optional and can be left empty. |
| service_filters | NodeService | repeated | Will filter the nodes by the given service filters. If more than one filter is added the combination will act as an 'AND' operation. So if two or more filters is used, all the filters must match for a node to be included in the response. These filters are optional and can be left empty. |
GetNodesRequest.MetadataFiltersEntry
GetNodesResponse
| Field | Type | Label | Description |
|---|
| nodes | Node | repeated | The nodes connected to the hub server. |
RemoveNodeRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The id of the node to remove. |
RemoveNodeResponse
StreamNodesInitialResponse
| Field | Type | Label | Description |
|---|
| nodes | Node | repeated | The nodes initially connected to the hub server. |
StreamNodesResponse
| Field | Type | Label | Description |
|---|
| initialResponse | StreamNodesInitialResponse | | Initial response contains the nodes initially connected to the hub server. |
| updateResponse | StreamNodesUpdateResponse | | Update response contains updates about newly authenticated, deauthenticated, mutated, connected or disconnected nodes. |
StreamNodesUpdateResponse
| Field | Type | Label | Description |
|---|
| connectedNode | Node | | The node that just connected. |
| disconnectedNode | Node | | The node that just disconnected. |
| authenticatedNode | Node | | The node that just was authenticated. |
| deauthenticatedNode | Node | | The node that just was deauthenticated. |
| updatedMetadataNode | Node | | The node that just had its metadata updated. |
| updatedNameNode | Node | | The node that just had its name updated. |
LoggingService
Source: logging.proto
The logging service is used to get the log message produced by the services running on a node. The logging service
is running on every node connected to the hub. So a node id is required for every method call to specify the node
that the request is intended for.
Message
A single logging message
| Field | Type | Label | Description |
|---|
| timestamp | google.protobuf.Timestamp | | |
| level | Level | | |
| message | string | | |
| data | string | | |
Messages
A collection of logging messages
| Field | Type | Label | Description |
|---|
| messages | Message | repeated | |
OpenLogStreamRequest
A request to open a stream to receive logging messages
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| options | Options | | |
Options
Logging stream options
| Field | Type | Label | Description |
|---|
| lines | int64 | | |
| resource_id | string | | |
Level
Logging levels for the pipeline logging messages
| Name | Number | Description |
|---|
| STATE | 0 | |
| DEBUG | 1 | |
| INFO | 2 | |
| WARNING | 3 | |
| ERROR | 4 | |
| FATAL | 5 | |
BoolMetric
Metadata for boolean metrics
| Field | Type | Label | Description |
|---|
| value | bool | | |
| description | string | | |
| unit | string | | |
Collection
Collection of metrics
Collection.MetricsEntry
| Field | Type | Label | Description |
|---|
| key | string | | |
| value | Metric | | |
Constant
A constant used when the value is fixed
| Field | Type | Label | Description |
|---|
| uint64 | uint64 | | |
| int64 | int64 | | |
| float64 | double | | |
| boolean | bool | | |
| string | string | | |
| description | string | | |
| unit | string | | |
Enum8Metric
Metadata for enumerated metrics
| Field | Type | Label | Description |
|---|
| value | uint32 | | |
| description | string | | |
| values | Enum8Metric.ValuesEntry | repeated | Mapping from index to enum info |
| unit | string | | |
Enum8Metric.EnumValue
| Field | Type | Label | Description |
|---|
| name | string | | |
| description | string | | |
Enum8Metric.ValuesEntry
Float32Metric
Metadata for 32-bit floating-point metrics
| Field | Type | Label | Description |
|---|
| value | float | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | float | | |
| max | float | | |
Float64Metric
Metadata for 64-bit floating-point metrics
| Field | Type | Label | Description |
|---|
| value | double | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | double | | |
| max | double | | |
Int32Metric
Metadata for signed 32-bit metrics
| Field | Type | Label | Description |
|---|
| value | int32 | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | int32 | | |
| max | int32 | | |
Int64Metric
Metadata for signed 64-bit metrics
| Field | Type | Label | Description |
|---|
| value | int64 | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | int64 | | |
| max | int64 | | |
Metric
Metadata for a single metric
UInt32Metric
Metadata for unsigned 32-bit metrics
| Field | Type | Label | Description |
|---|
| value | uint32 | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | uint32 | | |
| max | uint32 | | |
UInt64Metric
Metadata for unsigned 64-bit metrics
| Field | Type | Label | Description |
|---|
| value | uint64 | | |
| description | string | | |
| kind | Kind | | |
| unit | string | | |
| min | uint64 | | |
| max | uint64 | | |
Kind
| Name | Number | Description |
|---|
| GAUGE | 0 | Indicates that the metric value can both increase and decrease |
| COUNTER | 1 | Indicates that the metric value can only increase |
Blueprints
Source: network_blueprints.proto
The blueprint service allows to fetch, create, modify and delete blueprints.
Blueprint
| Field | Type | Label | Description |
|---|
| name | string | | The name of the blueprint. |
| template | string | | The template that is used to create a pipeline. |
| read_only | bool | | Whether the blueprint is read-only or not. |
BlueprintWrite
| Field | Type | Label | Description |
|---|
| name | string | | The name of the blueprint. |
| template | string | | The template that is used to create a pipeline. |
CreateBlueprintRequest
CreateBlueprintResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| blueprint | Blueprint | | |
DeleteBlueprintRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to delete. |
DeleteBlueprintResponse
GetBlueprintRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to fetch. |
GetBlueprintResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| blueprint | Blueprint | | |
GetBlueprintsRequest
GetBlueprintsResponse
UpdateBlueprintRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to update. |
| blueprint | BlueprintWrite | | |
UpdateBlueprintResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| blueprint | Blueprint | | |
NetworkInstances
Source: network_instances.proto
The network instance service is to fetch network instances and information about their associated pipelines. Network
instances cannot be created, edited, or deleted by the API. Network instances is managed by the associated Network
and the instances is created automatically by the network whenever a node is included in the Network configuration.
GetNetworkInstancesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The ID of the node to fetch network instances from. |
GetNetworkInstancesResponse
| Field | Type | Label | Description |
|---|
| network_instances | NetworkInstance | repeated | The network instances of the node. |
GetNetworkPipelinesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| optional_network_id | string | | |
| optional_instance_id | string | | |
| optional_blueprint_id | string | | |
GetNetworkPipelinesResponse
NetworkInstance
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the Network Instance. |
| network_id | string | | The ID of the associated Network. |
| network_name | string | | The name of the associated Network. |
| pipeline_ids | string | repeated | The IDs of the pipelines that are associated and managed by the Network Instance. |
NetworkInstanceLogStreamMessages
NetworkPipeline
| Field | Type | Label | Description |
|---|
| id | string | | |
| network_id | string | | |
| instance_id | string | | |
| blueprint_id | string | | |
| pipeline_id | string | | |
| pipeline_name | string | | |
OpenNetworkInstanceLogStreamRequest
StreamNetworkInstanceCreateEvent
StreamNetworkInstanceDeleteEvent
StreamNetworkInstanceEvent
StreamNetworkInstanceUpdateEvent
StreamNetworkInstancesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The ID of the node to stream for network instances from. |
StreamNetworkPipelineCreateEvent
StreamNetworkPipelineDeleteEvent
StreamNetworkPipelineEvent
StreamNetworkPipelineUpdateEvent
StreamNetworkPipelinesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | The ID of the node to stream for network instance pipelines from. |
Networks
Source: networks.proto
The network service allows to fetch, create, modify and delete networks.
Address
| Field | Type | Label | Description |
|---|
| ip | string | | |
| port | uint32 | | |
| external_ip | string | | |
Carrier
| Field | Type | Label | Description |
|---|
| address | Address | | |
| interface | string | | |
| bandwidth_priority | uint32 | | |
CreateNetworkRequest
| Field | Type | Label | Description |
|---|
| network | Network | | |
CreateNetworkResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| network | Network | | |
DeleteNetworkRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to fetch. |
DeleteNetworkResponse
GetNetworkRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to fetch. |
GetNetworkResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| network | Network | | |
GetNetworksRequest
GetNetworksResponse
Network
| Field | Type | Label | Description |
|---|
| name | string | | The name of the network. |
| subnet_cidr | string | | The CIDR of the subnet used in this network. E.g. 100.65.254.0/24 |
| blueprints | NetworkBlueprints | | The blueprints that are used to render the network. |
| parameters | string | | The parameters that are used to render network blueprints. Needs to be a JSON objects. Example: { "raft_timeout": 9000, "loss_emulation_percentage": 1 } |
| relay_node_id | string | | The node ID of the relay node in this network. |
| nodes | Node | repeated | Key is node ID, value is an assigned IP address |
NetworkBlueprints
| Field | Type | Label | Description |
|---|
| relay_blueprint | string | | |
| relay_client_blueprint | string | | |
| client_blueprint | string | | |
NetworkLogStreamMessages
Node
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| node_ip | string | | |
| carriers | Carrier | repeated | |
| type | NodeType | | |
| parameters | string | | |
OpenNetworkLogStreamRequest
StreamNetworksCreateEvent
| Field | Type | Label | Description |
|---|
| network | Network | | |
StreamNetworksDeleteEvent
| Field | Type | Label | Description |
|---|
| network | Network | | |
StreamNetworksEvent
StreamNetworksRequest
StreamNetworksUpdateEvent
| Field | Type | Label | Description |
|---|
| network | Network | | |
UpdateNetworkRequest
| Field | Type | Label | Description |
|---|
| id | string | | The ID of the network to update. |
| network | Network | | |
UpdateNetworkResponse
| Field | Type | Label | Description |
|---|
| id | string | | |
| network | Network | | |
NodeType
| Name | Number | Description |
|---|
| NODE_TYPE_CLIENT | 0 | |
| NODE_TYPE_RELAY | 1 | |
PipelinesService
Source: pipelines.proto
The pipelines service is used to manage the pipelines of a node hosting the service, such as the nanoping client. The
service can be used to create, update, delete, start, and stop pipelines. The service also provides the ability to
to fetch logs and telemetry data of pipeline runs. Since this service runs on multiple nodes, every method requires
the node_id of the node that the request is intended for.
CreatePipelineRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| name | string | | The name of the pipeline |
| json_config | string | | The JSON configuration of the pipeline |
| restart_policy | RestartPolicy | | The restart policy of the pipeline. Leave not-set for default value RestartPolicyNever. |
| default_logging_level | nanopinggrpc.logging.Level | | |
| instructions_timeout | int32 | | |
CreatePipelineResponse
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
DeletePipelineRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | |
DeletePipelineResponse
GetPipelineByIdRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | |
GetPipelineByIdResponse
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
GetPipelineByNameRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| name | string | | |
GetPipelineByNameResponse
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
GetPipelineByRunIdRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | |
GetPipelineByRunIdResponse
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
GetPipelinesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
GetPipelinesResponse
| Field | Type | Label | Description |
|---|
| pipelines | Pipeline | repeated | |
Kpi
| Field | Type | Label | Description |
|---|
| id | string | | |
| field | string | | |
| error | string | | |
| none_value | bool | | |
| string_value | string | | |
| uint64_value | uint64 | | |
| int64_value | int64 | | |
| uint32_value | uint32 | | |
| int32_value | int32 | | |
| float64_value | double | | |
| float32_value | float | | |
| bool_value | bool | | |
| enum8_value | uint32 | | |
LogStreamMessages
OpenLogStreamRequest
OpenTelemetryStreamRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| run_id | string | | |
Pipeline
A pipeline is an executable composition of network components.
| Field | Type | Label | Description |
|---|
| id | string | | ID of a pipeline |
| name | string | | The name of the pipeline |
| started | bool | | Whether the pipeline is running right now or not |
| current_run | string | | |
| json_config | string | | The JSON configuration of the pipeline |
| config_compatability | ConfigCompatability | | A read-only field of the compatibility of the pipeline configuration. |
| restart_policy | RestartPolicy | | The restart policy of the pipeline |
| default_logging_level | nanopinggrpc.logging.Level | | The default logging level of the pipeline |
| instructions_timeout | int32 | | The amount of time in seconds before considering a pipeline instruction as timed out |
RestartPolicy
Restart policy of a pipeline
RestartPolicyAlways
Restart policy of a pipeline that determines a pipeline to restart always when stopped or an error happens.
| Field | Type | Label | Description |
|---|
| max_restarts | int32 | | The maximum number of restarts allowed for the pipeline. If 0 the pipeline will keep retrying forever. |
RestartPolicyNever
Restart policy of a pipeline that determines a pipeline not to restart when stopped or an error happens.
RestartPolicyOnFailure
Restart policy of a pipeline that determines a pipeline to restart only when an error happens.
| Field | Type | Label | Description |
|---|
| max_restarts | int32 | | The maximum number of restarts allowed for the pipeline. If 0 the pipeline will keep retrying forever. |
StartPipelineRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | |
| name | string | | |
StartPipelineResponse
| Field | Type | Label | Description |
|---|
| run_id | string | | |
StopPipelineRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | |
| name | string | | |
| run_id | string | | |
StopPipelineResponse
StreamPipelinesCreateEvent
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
StreamPipelinesDeleteEvent
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
StreamPipelinesEvent
StreamPipelinesRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
StreamPipelinesUpdateEvent
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
TelemetrySample
UpdatePipelineRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |
| id | string | | The ID of the pipeline |
| name | string | | The name of the pipeline |
| json_config | string | | The JSON configuration of the pipeline |
| restart_policy | RestartPolicy | | The restart policy of the pipeline. |
| default_logging_level | nanopinggrpc.logging.Level | | The default logging level of the pipeline. |
| instructions_timeout | int32 | | The amount of time in seconds before considering a pipeline instruction as timed out. |
| force_restart | bool | | If true and the pipeline is currently running, the pipeline will be restarted if the configuration has changes that require a restart. |
UpdatePipelineResponse
| Field | Type | Label | Description |
|---|
| pipeline | Pipeline | | |
ConfigCompatability
Enum to represent the compatibility of the pipeline configuration
| Name | Number | Description |
|---|
| COMPATIBLE | 0 | |
| INCOMPATIBLE | 1 | If the nanoping client version is older than the pipeline configuration version the configuration is considered incompatible |
ResourcesService
Source: resources.proto
The resources service is used to get the metrics of the system a node is running on. The metrics include things such
as CPU usage, memory, storage, etc. The service is running on every node connected to the hub. So a node id is
required for every method call to specify the node that the request is intended for.
MetricsSample
OpenMetricsStreamRequest
| Field | Type | Label | Description |
|---|
| node_id | string | | |