jina.enums

class jina.enums.EnumType[source]

Bases: enum.EnumMeta

static register_class(cls)[source]
class jina.enums.BetterEnum[source]

Bases: enum.IntEnum

An enumeration.

classmethod from_string(s)[source]

Parse the enum from a string

classmethod to_yaml(representer, data)[source]

Required by ruamel.yaml.constructor

classmethod from_yaml(constructor, node)[source]

Required by ruamel.yaml.constructor

class jina.enums.SchedulerType[source]

Bases: jina.enums.BetterEnum

An enumeration.

LOAD_BALANCE = 0

balance the workload between Peas, faster peas get more work

ROUND_ROBIN = 1

workload are scheduled round-robin manner to the peas, assuming all peas have uniform processing speed.

class jina.enums.PollingType[source]

Bases: jina.enums.BetterEnum

The enum for representing the parallel type of peas in a pod

ANY = 1

one of the replica will receive the message

ALL = 2

all replica will receive the message, blocked until all done with the message

ALL_ASYNC = 3

(reserved) all replica will receive the message, but any one of them can return, useful in backup

property is_push
Return type

bool

Returns

if this PollingType is using push protocol

property is_block
Return type

bool

Returns

if this PollingType is requiring block protocol

class jina.enums.FlowOptimizeLevel[source]

Bases: jina.enums.BetterEnum

The level of flow optimization

NONE = 0
IGNORE_GATEWAY = 1
FULL = 2
class jina.enums.LogVerbosity[source]

Bases: jina.enums.BetterEnum

Verbosity level of the logger

DEBUG = 10
INFO = 20
SUCCESS = 25
WARNING = 30
ERROR = 40
CRITICAL = 50
class jina.enums.SocketType[source]

Bases: jina.enums.BetterEnum

Enums for representing the socket type in a pod

PULL_BIND = 0
PULL_CONNECT = 1
PUSH_BIND = 2
PUSH_CONNECT = 3
SUB_BIND = 4
SUB_CONNECT = 5
PUB_BIND = 6
PUB_CONNECT = 7
PAIR_BIND = 8
PAIR_CONNECT = 9
ROUTER_BIND = 10
DEALER_CONNECT = 11
property is_bind
Return type

bool

Returns

if this socket is using bind protocol

property is_receive
Return type

bool

Returns

if this socket is used for receiving data

property is_pubsub
Returns

if this socket is used for publish or subscribe data

property paired
Return type

SocketType

Returns

a paired

class jina.enums.FlowOutputType[source]

Bases: jina.enums.BetterEnum

The enum for representing flow output config

SHELL_PROC = 0

a shell-script, run each microservice as a process

SHELL_DOCKER = 1

a shell-script, run each microservice as a container

DOCKER_SWARM = 2

a docker-swarm YAML config

K8S = 3

a Kubernetes YAML config

class jina.enums.FlowBuildLevel[source]

Bases: jina.enums.BetterEnum

The enum for representing a flow’s build level

Some jina.flow.Flow class functions require certain build level to run.

EMPTY = 0

Nothing is built

GRAPH = 1

The underlying graph is built, you may visualize the flow

class jina.enums.PeaRoleType[source]

Bases: jina.enums.BetterEnum

The enum of a Pea role

REPLICA = 0
HEAD = 1
TAIL = 2
SHARD = 3
SINGLETON = 4
class jina.enums.ClientMode[source]

Bases: jina.enums.BetterEnum

The enum of Client mode

INDEX = 0
SEARCH = 1
TRAIN = 2
class jina.enums.OnErrorSkip[source]

Bases: jina.enums.BetterEnum

The level of error handling

NONE = 0
EXECUTOR = 1
DRIVER = 2
HANDLE = 3
CALLBACK = 4