示例#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',
示例#2
0
文件: components.py 项目: siq/flux
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"]),
示例#3
0
文件: components.py 项目: siq/flux
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'},
        },
    ),
示例#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])