Documentation
¶
Index ¶
- Constants
- type Application
- func (a *Application) GetAPIVersion() string
- func (a *Application) GetCustomConfig() KV
- func (a *Application) GetMatchedPrimaryPort(name PortName) *MatchedPrimaryPort
- func (a *Application) GetMatchedPrimaryPortLocation(name PortName) *Location
- func (a *Application) GetName() string
- func (a *Application) GetSecondaryPort(name PortName) *SecondaryPort
- func (a *Application) GetSecondaryPorts() map[PortName]SecondaryPort
- type ApplicationSpec
- type Common
- type Database
- type Encryptor
- type Interface
- type KV
- func (kv KV) Get(key string) interface{}
- func (kv KV) GetBool(key string) bool
- func (kv KV) GetDuration(key string) time.Duration
- func (kv KV) GetFloat64(key string) float64
- func (kv KV) GetInt(key string) int
- func (kv KV) GetInt32(key string) int32
- func (kv KV) GetInt64(key string) int64
- func (kv KV) GetString(key string) string
- func (kv KV) GetStringMap(key string) map[string]interface{}
- func (kv KV) GetStringMapString(key string) map[string]string
- func (kv KV) GetStringMapStringSlice(key string) map[string][]string
- func (kv KV) GetStringSlice(key string) []string
- func (kv KV) GetTime(key string) time.Time
- func (kv KV) GetUint(key string) uint
- func (kv KV) GetUint32(key string) uint32
- func (kv KV) GetUint64(key string) uint64
- func (kv KV) LoadTo(out interface{}) error
- type Location
- type Log
- type MatchedPrimaryPort
- type ObjectMeta
- type PortName
- type PreProcessFunc
- type PrimaryPort
- type SaramaConfig
- type SecondaryPort
- type TypeMeta
- type Var
Constants ¶
View Source
const ( // NoResponse doesn't send any response, the TCP ACK is all you get. NoResponse sarama.RequiredAcks = 0 // WaitForLocal waits for only the local commit to succeed before responding. WaitForLocal sarama.RequiredAcks = 1 // WaitForAll waits for all in-sync replicas to commit before responding. // The minimum number of in-sync replicas is configured on the broker via // the `min.insync.replicas` configuration key. WaitForAll sarama.RequiredAcks = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationSpec `json:"spec,omitempty"`
}
func New ¶
func New(configFile string, funcs ...PreProcessFunc) (*Application, error)
func (*Application) GetAPIVersion ¶
func (a *Application) GetAPIVersion() string
func (*Application) GetCustomConfig ¶
func (a *Application) GetCustomConfig() KV
func (*Application) GetMatchedPrimaryPort ¶
func (a *Application) GetMatchedPrimaryPort(name PortName) *MatchedPrimaryPort
func (*Application) GetMatchedPrimaryPortLocation ¶
func (a *Application) GetMatchedPrimaryPortLocation(name PortName) *Location
func (*Application) GetName ¶
func (a *Application) GetName() string
func (*Application) GetSecondaryPort ¶
func (a *Application) GetSecondaryPort(name PortName) *SecondaryPort
func (*Application) GetSecondaryPorts ¶
func (a *Application) GetSecondaryPorts() map[PortName]SecondaryPort
type ApplicationSpec ¶
type ApplicationSpec struct {
PrimaryPorts map[PortName]PrimaryPort `json:"primary_ports,omitempty"`
SecondaryPorts map[PortName]SecondaryPort `json:"secondary_ports,omitempty"`
CustomConfig KV `json:"custom_config,omitempty"`
}
type Common ¶
type Common struct {
Log Log `json:"log,omitempty"`
Database Database `json:"database,omitempty"`
Encryptor Encryptor `json:"encryptor,omitempty"`
Var Var `json:"var,omitempty"`
SaramaConfig SaramaConfig `json:"sarama_config,omitempty"`
}
type Database ¶
type Database struct {
MaxOpenConnections int `json:"max_open_connections,omitempty"`
MaxIdleConnections int `json:"max_idle_connections,omitempty"`
ConnectionMaxLifeSeconds int64 `json:"connection_max_life_seconds,omitempty"`
ConnectionMaxIdleSeconds int64 `json:"connection_max_idle_seconds,omitempty"`
SlowThresholdMilliseconds int64 `json:"slow_threshold_milliseconds,omitempty"`
}
type KV ¶
type KV map[string]interface{}
func (KV) GetFloat64 ¶
func (KV) GetStringMap ¶
func (KV) GetStringMapStringSlice ¶
func (KV) GetStringSlice ¶
type MatchedPrimaryPort ¶
type ObjectMeta ¶
type PreProcessFunc ¶
type PrimaryPort ¶
type SaramaConfig ¶
type SaramaConfig struct {
ClientID string `json:"client_id,omitempty"`
ChannelBufferSize int `json:"channel_buffer_size,omitempty"`
ProducerReturnSuccesses bool `json:"producer_return_successes,omitempty"`
ProducerRetryMax int `json:"producer_retry_max,omitempty"`
ProducerRequiredAcks sarama.RequiredAcks `json:"producer_required_acks,omitempty"`
ProducerTimeout int `json:"producer_timeout,omitempty"`
ProducerFlushFrequency int `json:"producer_flush_frequency,omitempty"`
NetTLSEnable bool `json:"net_tls_enable,omitempty"`
NetTLSConfig *tls.Config `json:"net_tls_config,omitempty"`
InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
CertFile string `json:"cert_file,omitempty"`
KeyFile string `json:"key_file,omitempty"`
CaFile string `json:"ca_file,omitempty"`
K8sNamespace string `json:"k8s_namespace,omitempty"`
K8sSecret string `json:"k8s_secret,omitempty"`
}
type SecondaryPort ¶
type SecondaryPort struct {
Interface Interface `json:"interface,omitempty"`
Options KV `json:"options,omitempty"`
MatchedPrimaryPort *MatchedPrimaryPort `json:"matched_primary_port,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.