Giter VIP home page Giter VIP logo

flyte-serf's Introduction

flyte-serf

Build Status Docker Stars Docker Pulls

A Serf pack for Flyte which will join an existing Serf cluster and allow you to raise and respond to events from your Flyte flows.

It provides two triggers UserEvent, MemberEvent and one command SendEvent.

ENV Configuration

env. variable default description
SERF_NODE_NAME flyte-serf The name of this node in the cluster.
SERF_ADVERTISE Address that we advertise to other nodes in the cluster. By default, the bind address is advertised.
SERF_JOIN_HOSTS Address of another agent to join upon starting up. This can be comma delimited to specify multiple agents to join.
SERF_KEYRING_FILE Specifies a file to load keyring data from.
FLYTE_API The FLYTE API endpoint to use.
PACK_NAME Serf Specifies pack name to register with.

Events

UserEvent

This event is invoked when Serf agent receives user event. Event output is a map of strings

{
    "name": "...user event name...",
    "payload": "...user event payload..."
}

MemberEvent

This event is invoked when Serf agent receives member event: join, leave or failed. This event is disabled currently. Event output is a map of strings

{
    "name": "...member event name...",
    "memberName": "...Serf node name...",
    "memberAddr": "...Serf node address..."
}

EventSent

This event is emitted on the successful invocation of the SendEvent command. It's payload is:

{
    "name": "...user event name...",
    "payload": "...user event payload...",
    "coalesce": "...coalesce flag..."
}

SendEventFailed

This event is emitted on the unsuccessful invocation of the SendEvent command. It's payload is an error message.

Commands

SendEvent

This command sends user event to a serf cluster. Command's input is

{
    "name": "...user event name...",
    "payload": "...user event payload...",
    "coalesce": "...coalesce flag..."
}

This command can output two event types: EventSent and SendEventFailed

Build and run

GO

To build and run from the command line:

  • Clone this repo
  • Run go build
  • FLYTE_API="FLYTE_API_URL" ./flyte-serf

Docker

docker build -t flyte-serf:latest .
docker run --rm flyte-serf:latest

flyte-serf's People

Contributors

balazs-fark-epam avatar dangorst1066 avatar fooksca avatar isaacasensio avatar jollinshead avatar pamelin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.