remoteconfig

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

TODO: Inject to a global interface e.g. command factory as soon as it exists and remove this file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCondition

func AddCondition(name, description string, conditionFunc func() bool)

func GetGlobal

func GetGlobal() types.RemoteConfig

GetGlobal returns the global remote config. Returns nil if InitGlobal was not called in advance.

func GetGlobalSponsorship added in v1.24.8

func GetGlobalSponsorship() types.SponsorshipManager

GetGlobalSponsorship returns the global sponsorship manager. Returns nil if InitGlobalSponsorship was not called in advance.

func InitGlobal

func InitGlobal(config Config, stateManager statetypes.State, isInternetActive func() bool) types.RemoteConfig

InitGlobal initializes the global remote config. This is done once, subsequent calls do not have any effect.

func InitGlobalSponsorship added in v1.24.8

func InitGlobalSponsorship(localPath string, stateManager statetypes.State, isInternetActive func() bool, updateInterval int, url string) types.SponsorshipManager

InitGlobalSponsorship initializes the global sponsorship manager using a direct URL. This is done once, subsequent calls do not have any effect.

func ListConditions

func ListConditions() (conditions map[string]string)

func New

func New(config *Config, stateManager statetypes.State, isInternetActive func() bool) types.RemoteConfig

New creates and returns a new RemoteConfig.

func NewSponsorshipManager added in v1.24.8

func NewSponsorshipManager(localPath string, stateManager statetypes.State, isInternetActive func() bool, updateInterval int, url string) types.SponsorshipManager

NewSponsorshipManager creates a new sponsorship data manager using a direct URL

Types

type Config

type Config struct {
	Local Local
	URL   string

	UpdateInterval int
	TickerInterval int
}

Config is the struct defining the RemoteConfig config.

type Local

type Local struct {
	Path string
}

Local is the struct defining the local source.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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