Mesh Discovery (Insight)
Package: com.mimik.mimoe.insight
Device mesh discovery and networking.
InsightClient
class InsightClient
Insight (mesh discovery) sub-client.
Provides node discovery via link-local, account, and proximity methods. Base path: /mimik-mesh/insight/v1 Requires the mesh-foundation addon.
Access via client.insight.
Functions
discoverByAccount
suspend fun discoverByAccount(): Result<List<NodeInfo>>
Discover nodes associated with the same account.
discoverByProximity
suspend fun discoverByProximity(): Result<List<NodeInfo>>
Discover nodes by proximity.
discoverLinkLocal
suspend fun discoverLinkLocal(): Result<List<NodeInfo>>
Discover nodes on the local network.
getSelf
suspend fun getSelf(): Result<NodeInfo>
Get information about the current node.
storeToken
suspend fun storeToken(token: String, expiresAt: Long? = null): Result<Unit>
Store a JWT for account-scoped operations.
NodeAddress
@Serializable
data class NodeAddress(
val type: String = "",
val url: NodeUrl = NodeUrl()
)
A network address for a node.
Constructors
constructor(type: String = "", url: NodeUrl = NodeUrl())
Properties
| Name | Summary |
|---|---|
type | val type: StringAddress type classification. |
url | val url: NodeUrlURL containing the endpoint href. |
NodeInfo
@Serializable
data class NodeInfo(
val id: String,
val accountId: String? = null,
val name: String = "",
val os: String = "",
val addresses: List<NodeAddress> = emptyList(),
val services: List<NodeService> = emptyList()
)
Information about a discovered node.
Fields match the Insight API response from GET /mimik-mesh/insight/v1/nodes and GET /mimik-mesh/insight/v1/info?types=self.
Constructors
constructor(
id: String,
accountId: String? = null,
name: String = "",
os: String = "",
addresses: List<NodeAddress> = emptyList(),
services: List<NodeService> = emptyList()
)
Properties
| Name | Summary |
|---|---|
accountId | val accountId: String? = nullAssociated account ID. |
addresses | val addresses: List<NodeAddress>Network addresses. |
id | val id: StringNode unique identifier. |
name | val name: StringHuman-readable node name. |
os | val os: StringOperating system (e.g., "android", "ios"). |
services | val services: List<NodeService>Deployed services on this node. |
NodeService
@Serializable
data class NodeService(
val id: String = "",
val serviceType: String = "",
val version: String = "",
val status: String = "",
val tenant: String = ""
)
A service deployed on a node.
Constructors
constructor(
id: String = "",
serviceType: String = "",
version: String = "",
status: String = "",
tenant: String = ""
)
Properties
| Name | Summary |
|---|---|
id | val id: StringService identifier. |
serviceType | val serviceType: StringService/mim image name. |
status | val status: StringCurrent status (e.g., "running"). |
tenant | val tenant: StringTenant identifier. |
version | val version: StringService version. |
NodeUrl
@Serializable
data class NodeUrl(val href: String = "")
Constructors
constructor(href: String = "")
Properties
| Name | Summary |
|---|---|
href | val href: StringFull endpoint URL. |