darklaunch_manager

package
v0.0.0-...-9c2a5be Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGrayTestingOn

func IsGrayTestingOn() bool

func TurnGrayTestingOff

func TurnGrayTestingOff(req string)

func TurnGrayTestingOn

func TurnGrayTestingOn(req string)

Types

type DarkLaunchManager

type DarkLaunchManager struct {
	// contains filtered or unexported fields
}

func NewDarkLaunchManager

func NewDarkLaunchManager() *DarkLaunchManager

func NewDarkLaunchManager2

func NewDarkLaunchManager2(path string) *DarkLaunchManager

func (*DarkLaunchManager) AddIp

func (m *DarkLaunchManager) AddIp(ip string) error

func (*DarkLaunchManager) AddService

func (m *DarkLaunchManager) AddService(service string) error

func (*DarkLaunchManager) ContainsIp

func (m *DarkLaunchManager) ContainsIp(ip string) bool

judge if ip is in dark mode

func (*DarkLaunchManager) ContainsService

func (m *DarkLaunchManager) ContainsService(service string) bool

judge if ip is in dark mode

func (*DarkLaunchManager) IpList

func (m *DarkLaunchManager) IpList() []string

func (*DarkLaunchManager) IsDarkModeOn

func (m *DarkLaunchManager) IsDarkModeOn() bool

func (*DarkLaunchManager) RemoveIp

func (m *DarkLaunchManager) RemoveIp(ip string) error

func (*DarkLaunchManager) RemoveService

func (m *DarkLaunchManager) RemoveService(service string) error

func (*DarkLaunchManager) ServiceList

func (m *DarkLaunchManager) ServiceList() []string

func (*DarkLaunchManager) SetIpListener

func (m *DarkLaunchManager) SetIpListener(ipListener IpListener) *DarkLaunchManager

func (*DarkLaunchManager) SetServiceListener

func (m *DarkLaunchManager) SetServiceListener(serviceListener ServiceListener) *DarkLaunchManager

type IpListener

type IpListener interface {
	// AfterDarkIpAdded trigger something after an ip is marked as dark ip
	AfterDarkIpAdded(addedIp string)

	// AfterDarkIpRevoked trigger something after a ip is revoked from dark ip list
	AfterDarkIpRevoked(revokedIp string)
}

type ServiceListener

type ServiceListener interface {

	// AfterDarkServiceAdded trigger something after an ip is marked as dark ip
	AfterDarkServiceAdded(addedService string)

	// AfterDarkServiceRevoked trigger something after a ip is revoked from dark ip list
	AfterDarkServiceRevoked(revokedService string)
}

Jump to

Keyboard shortcuts

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