dragon.infrastructure.channel_desc

A class that uniquely defines properties of a managed channel for infrastructure communication.

Classes

ChannelDescriptor

Globally available description of a managed channel.

ChannelOptions

Open type, placeholder, for options on how to make a channel

class ChannelDescriptor

Globally available description of a managed channel.

Attributes:

nodenonnegative int

which node this channel

namestr

user assigned unique name of the process

c_uidnonnegative int

unique channel id

m_uidnonnegative int

memory pool containing this channel

sdescbytes-like object

serialized descriptor from the Channels library

statecls.State enum member

current run state of this process

class State

Current state of the channel.

__init__(m_uid, c_uid, name, node, state=None, sdesc='')

sdesc - serialized library descriptor

property sdesc

Returns the serialized library descriptor of the channel.

get_sdict()

Collect the entire information of the channel.

Returns

A dictionary with all key-value pairs of the available description of the channel.

Return type

Dictionary

classmethod from_sdict(sdict)

Returns the descriptor of the managed channel.

class ChannelOptions

Open type, placeholder, for options on how to make a channel

Attributes:

local_opts

local channel creation options, such as block size and capacity. see dragon.localservices.options.ChannelOptions

ref_count

bool, default False, whether GS should count references on this channel and destroy if count reaches zero

NOTE: these options will be growing and the scheme needs thought for organization.

__init__(*, local_opts=None, ref_count=False)
get_sdict()

Collect the different attributes/options of the channel.

Returns

A dictionary with key-value pairs of the channel options.

Return type

Dictionary

static from_sdict(sdict)

Returns the options of the managed channel.