Exemplo n.º 1
0
from flux.bindings import docket, platoon
from flux.bundles import API
from flux.operations import OPERATIONS
from flux.resources import *

Executor = bind(platoon, 'platoon/1.0/executor')
Intent = bind(docket, 'docket/1.0/intent')
Registration = bind(docket, 'docket/1.0/registration')
SubscribedTask = bind(platoon, 'platoon/1.0/subscribedtask')

ENTITY_REGISTRATIONS = [
    Registration(
        id='flux:workflow',
        name='workflow',
        title='Workflow',
        specification=API.describe(['workflow']),
        cached_attributes={
            'is_service': {
                'type': 'boolean'
            },
            'type': {
                'type': 'text'
            },
        },
    ),
    Registration(
        id='flux:run',
        name='run',
        title='Run',
        specification=API.describe(['run']),
        change_event='run:changed',
Exemplo n.º 2
0
from flux.bindings import docket, platoon
from flux.bundles import API
from flux.operations import OPERATIONS
from flux.resources import *

Executor = bind(platoon, "platoon/1.0/executor")
Intent = bind(docket, "docket/1.0/intent")
Registration = bind(docket, "docket/1.0/registration")
SubscribedTask = bind(platoon, "platoon/1.0/subscribedtask")

ENTITY_REGISTRATIONS = [
    Registration(
        id="flux:workflow",
        name="workflow",
        title="Workflow",
        specification=API.describe(["workflow"]),
        cached_attributes={"is_service": {"type": "boolean"}, "type": {"type": "text"}},
    ),
    Registration(
        id="flux:run",
        name="run",
        title="Run",
        specification=API.describe(["run"]),
        change_event="run:changed",
        cached_attributes={"status": {"type": "text"}},
    ),
    Registration(
        id="flux:request",
        name="request",
        title="Request",
        specification=API.describe(["request"]),
Exemplo n.º 3
0
from flux.bindings import docket, platoon
from flux.bundles import API
from flux.operations import OPERATIONS
from flux.resources import *

Executor = bind(platoon, 'platoon/1.0/executor')
Intent = bind(docket, 'docket/1.0/intent')
Registration = bind(docket, 'docket/1.0/registration')
SubscribedTask = bind(platoon, 'platoon/1.0/subscribedtask')

ENTITY_REGISTRATIONS = [
    Registration(
        id='flux:workflow',
        name='workflow',
        title='Workflow',
        specification=API.describe(['workflow']),
        cached_attributes={
            'is_service': {'type': 'boolean'},
            'type': {'type': 'text'},
        },
    ),
    Registration(
        id='flux:run',
        name='run',
        title='Run',
        specification=API.describe(['run']),
        change_event='run:changed',
        cached_attributes={
            'status': {'type': 'text'},
        },
    ),
Exemplo n.º 4
0
from spire.core import Component, Dependency
from spire.mesh import MeshDependency, MeshServer
from spire.runtime import onstartup

import flux.models
from flux.bindings import docket, platoon
from flux.bundles import API
from flux.operations import OPERATIONS
from flux.resources import *

Executor = bind(platoon, "platoon/1.0/executor")
Intent = bind(docket, "docket/1.0/intent")
Registration = bind(docket, "docket/1.0/registration")

ENTITY_REGISTRATIONS = [
    Registration(id="flux:workflow", name="workflow", title="Workflow", specification=API.describe(["workflow"])),
    Registration(
        id="flux:run",
        name="run",
        title="Run",
        specification=API.describe(["run"]),
        change_event="run:changed",
        cached_attributes={"status": {"type": "text"}},
    ),
]

GENERATED_BY = Intent(id="generated-by", name="Generated by", exclusive=True)


class Flux(Component):
    api = MeshServer.deploy(bundles=[API])