Documentation
¶
Index ¶
- Constants
- func BatchEvents() gin.HandlerFunc
- func DevCycleAuthRequired() gin.HandlerFunc
- func Feature() gin.HandlerFunc
- func GetConfig(client *devcycle.Client, version ...string) gin.HandlerFunc
- func Health(c *gin.Context)
- func SSE() gin.HandlerFunc
- func Track() gin.HandlerFunc
- func Variable() gin.HandlerFunc
- type FullEnvConfig
- type InitialConfig
- type ProxyConfig
- type ProxyInstance
- type SDKConfig
Constants ¶
View Source
const (
EnvVarPrefix = "DEVCYCLE_PROXY"
)
View Source
const Version = "2.5.4"
Variables ¶
This section is empty.
Functions ¶
func BatchEvents ¶
func BatchEvents() gin.HandlerFunc
func DevCycleAuthRequired ¶
func DevCycleAuthRequired() gin.HandlerFunc
func Feature ¶
func Feature() gin.HandlerFunc
func SSE ¶
func SSE() gin.HandlerFunc
func Track ¶
func Track() gin.HandlerFunc
func Variable ¶
func Variable() gin.HandlerFunc
Types ¶
type FullEnvConfig ¶
type FullEnvConfig struct {
InitialConfig
ProxyInstance
}
For parsing the full config along with the proxy settings
type InitialConfig ¶
type InitialConfig struct {
ConfigPath string `envconfig:"CONFIG" desc:"The path to a JSON config file."`
Debug bool `envconfig:"DEBUG" default:"false" desc:"Whether to enable debug mode."`
}
For parsing just the config filename, before we know the intended config mechanism
type ProxyConfig ¶
type ProxyConfig struct {
Instances []*ProxyInstance `json:"instances"`
}
func ParseConfig ¶
func ParseConfig(configPath string) (*ProxyConfig, error)
Parse the config from either a JSON file or environment variables
func SampleProxyConfig ¶
func SampleProxyConfig() ProxyConfig
func (*ProxyConfig) Default ¶
func (c *ProxyConfig) Default()
type ProxyInstance ¶
type ProxyInstance struct {
UnixSocketPath string `json:"unixSocketPath" envconfig:"UNIX_SOCKET_PATH" desc:"The path to the Unix socket."`
UnixSocketPermissions string `` /* 146-byte string literal not displayed */
UnixSocketEnabled bool `` /* 133-byte string literal not displayed */
HTTPPort int `json:"httpPort" envconfig:"HTTP_PORT" default:"8080" desc:"The port to listen on for HTTP requests. Defaults to 8080."`
HTTPEnabled bool `json:"httpEnabled" envconfig:"HTTP_ENABLED" default:"true" desc:"Whether to enable the HTTP server. Defaults to true."`
SSEEnabled bool `` /* 155-byte string literal not displayed */
SSEHostname string `` /* 211-byte string literal not displayed */
SSEXForwardedOnly bool `` /* 174-byte string literal not displayed */
SSEHttps bool `` /* 128-byte string literal not displayed */
SDKKey string `json:"sdkKey" required:"true" envconfig:"SDK_KEY" desc:"The Server SDK key to use for this instance."`
LogFile string `json:"logFile" default:"" envconfig:"LOG_FILE" desc:"The path to the log file."`
PlatformData devcycle.PlatformData `json:"platformData" required:"true"`
SDKConfig SDKConfig `json:"sdkConfig" required:"true"`
// contains filtered or unexported fields
}
func NewBucketingProxyInstance ¶
func NewBucketingProxyInstance(instance *ProxyInstance) (*ProxyInstance, error)
func (*ProxyInstance) BuildDevCycleOptions ¶
func (i *ProxyInstance) BuildDevCycleOptions() *devcycle.Options
func (*ProxyInstance) BypassSDKConfig ¶
func (i *ProxyInstance) BypassSDKConfig(version string) (config []byte, etag, lastModified string)
func (*ProxyInstance) Close ¶
func (i *ProxyInstance) Close() error
func (*ProxyInstance) Default ¶
func (i *ProxyInstance) Default()
func (*ProxyInstance) EventRebroadcaster ¶
func (i *ProxyInstance) EventRebroadcaster()
type SDKConfig ¶
type SDKConfig struct {
EventFlushIntervalMS int64 `` /* 139-byte string literal not displayed */
ConfigPollingIntervalMS int64 `` /* 146-byte string literal not displayed */
RequestTimeout int64 `` /* 132-byte string literal not displayed */
DisableAutomaticEventLogging bool `` /* 150-byte string literal not displayed */
DisableCustomEventLogging bool `` /* 144-byte string literal not displayed */
MaxEventQueueSize int `` /* 132-byte string literal not displayed */
FlushEventQueueSize int `` /* 132-byte string literal not displayed */
ConfigCDNURI string `` /* 143-byte string literal not displayed */
EventsAPIURI string `` /* 143-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.