core / pragma.services / NodeService /

NodeService #

abstract class NodeService(pragmaNode: PragmaNode) : Service

A basic RPC client. Used by DistributedServices.

  • Is notified about config changes
  • Lives in memory as a singleton
  • Will not be instantiated on a node unless added as a dependency to at least one DistributedService via @PragmaService.dependencies
  • DistributedServices may only access a NodeService if they include it as a dependency (see above)

Typically used for making calls to other Pragma backends (such as social or game) or communicating with a database.

Constructors #

NodeService

fun NodeService(pragmaNode: PragmaNode)

Inheritors #

Name

ContentDataNodeService

AlwaysStartedNodeService