dasher

Dasher: Your Agile Feature Toggle and Experimentation Engine

license server ci/cd

Dasher empowers startups and agile teams to rapidly iterate, test, and validate ideas without costly upfront development.

Key Features

Upcoming Features

Why Dasher?

Who Should Use Dasher?

Preview

preview image

Getting Started

Start the server

You can use the official Docker image. Because Dasher is a stateful application, make sure to mount a volume to the container. The following example uses the current working directory as data volume.

docker run --name my-dasher-server \
    -p 3000:3000 \
    -p 50051:50051 \
    -v .:/data \
    ghcr.io/flohansen/dasher-server:latest

Define feature toggles in your application

go get github.com/flohansen/dasher
package toggles

import (
    "github.com/flohansen/dasher/pkg/dasher"
)

var (
    VerboseLogging = dasher.NewFeature(dasher.FeatureOptions{
        Name: "USE_VERBOSE_LOGGING",
        Description: "If the application should log more verbose",
    })

    // Add more features ...
)

func init() {
    // This registers the feature. The dasher server will create a toggle, if
    // it does not exist.
    dasher.MustRegister(VerboseLogging)

    // Register more features ...
}
package main

import (
    "context"
    "log"
    "os"

    "github.com/flohansen/dasher/pkg/dasher"
)

var (
    dasherServerAddr = os.Getenv("DASHER_SERVER_ADDR")
)

func main() {
    ctx := context.Background()

    // This will subscribe to any changes related to the defined features. On
    // every change the states of the features will be updated.
    go dasher.Listen(ctx, dasherServerAddr)

    for {
        // Check the state of the feature toggle. The "Enabled" property is
        // being synchronized with the feature toggle state of the server.
        if toggles.VerboseLogging.Enabled {
            log.Println("wait one second...")
        }

        time.Sleep(time.Second)
    }
}