unleash

package
v0.0.0-...-650128e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

FIXME: golangci-lint nolint:errcheck,govet,revive

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeListener

type EdgeListener struct{}

nolint:revive // EdgeListener is an implementation of all of the listener interfaces that simply logs debug info to stdout. It is meant for logging purposes.

func (EdgeListener) OnCount

func (l EdgeListener) OnCount(name string, enabled bool)

OnCount prints to the console when the feature is queried. This is done every 5 seconds, too much for edge-api

func (EdgeListener) OnError

func (l EdgeListener) OnError(err error)

OnError prints out errors.

func (EdgeListener) OnReady

func (l EdgeListener) OnReady()

OnReady prints to the console when the repository is ready.

func (EdgeListener) OnRegistered

func (l EdgeListener) OnRegistered(payload unleashclient.ClientData)

OnRegistered prints to the console when the client has registered.

func (EdgeListener) OnSent

func (l EdgeListener) OnSent(payload unleashclient.MetricsData)

OnSent prints to the console when the server has uploaded metrics. This is done on every request, too much for edge-api

func (EdgeListener) OnWarning

func (l EdgeListener) OnWarning(warning error)

OnWarning prints out warning.

type FakeUnleashServer

type FakeUnleashServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

FakeUnleashServer is the server object

func NewFakeUnleash

func NewFakeUnleash() *FakeUnleashServer

NewFakeUnleash is the init function for the fake server

func (*FakeUnleashServer) Disable

func (f *FakeUnleashServer) Disable(feature string)

Disable turns off a passed feature

func (*FakeUnleashServer) DisableAll

func (f *FakeUnleashServer) DisableAll()

DisableAll turns off all features

func (*FakeUnleashServer) Enable

func (f *FakeUnleashServer) Enable(feature string)

Enable turns on a passed feature

func (*FakeUnleashServer) EnableAll

func (f *FakeUnleashServer) EnableAll()

EnableAll turns on all features

func (*FakeUnleashServer) IsEnabled

func (f *FakeUnleashServer) IsEnabled(feature string) bool

IsEnabled returns a bool of if a feature is enabled or not

func (*FakeUnleashServer) URL

func (f *FakeUnleashServer) URL() string

URL returns the given fake URL

Directories

Path Synopsis
Package feature configures and handles feature flags for use in the application
Package feature configures and handles feature flags for use in the application

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL