types

package
v0.0.0-...-f374617 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CimStateInvalid = iota
	CimInitializing
	CimLogInitialized
	CimStateRegistered
)
View Source
const (
	LogFormatText    string = "text"
	LogFormatJson           = "json"
	LogFormatInvalid        = "invalid"
)
View Source
const (
	ProtocolHTTP2 = "http2"
	ProtocolHTTP  = "http"
)

Variables

View Source
var (
	ConfigDetails        *Config
	CommonInfraConfigObj *CommonInfraConf
	InTopic              string
	OutTopic             string
)
View Source
var (
	PodDetails                     *v1.Pod
	Namespace                      string
	ConfigmapName                  string
	PodID                          string
	MicroserviceName               string
	DeploymentID                   string
	InstanceID                     string
	ActivePods                     int32
	PassivePods                    int
	MsConfigVersion                string
	NfConfigVersion                string
	ConfigMapRevision              string
	AppPort                        string
	Userinputs                     *UserInput
	ModeOfDeployment               string
	AlertsReloader                 string
	NatsConnection                 *nats.Conn
	AppVersion                     string
	XGVelaRegistration             = make(chan bool)
	TMaasFqdn                      string
	ApigwRestFqdn                  string
	TopoEngineFqdn                 string
	ApigwRestURIPrefix             string
	XGVelaNamespace                string
	NfID                           string
	LOGTopicSubscribed             bool
	CIMRestPort                    int
	CIMNatsPort                    int
	ContainerID                    string
	ContainerName                  string
	AppShutDownCause               []string
	FlushAppLogs                   = make(chan bool)
	AppLogsFlushed                 bool
	AppShutDownCauseCimTermination = "AppShutDownCauseCimTermination"
)

Functions

This section is empty.

Types

type CimConfig

type CimConfig struct {
	Lmaas    *Lmaas    `json:"lmaas,omitempty"`
	App      *Config   `json:"cim_settings,omitempty"`
	Subjects *Subjects `json:"app_settings,omitempty"`
}

type CimState

type CimState int
var CurrentCimState CimState

func (CimState) String

func (cs CimState) String() string

type CommonInfraConf

type CommonInfraConf struct {
	EtcdURL           string   `json:"etcd_url"`
	KafkaBrokers      []string `json:"kafka_brokers"`
	LoggingSvcUrl     string   `json:"logging_svc_url"`
	LoggingSvcTcpPort string   `json:"logging_svc_tcp_port"`
	EnableRetx        string   `json:"enable_retrx"`
	APIGwFqdn         string   `json:"apigw_rest_fqdn"`
	TopoEngineFqdn    string   `json:"topoengine_fqdn"`
	LogFormat         string   `json:"log_format"`
}

type Config

type Config struct {
	// KafkaEnabled       bool     `json:"kafka_enabled"`
	EnableKpi           bool   `json:"enable_kpi,omitempty"`
	KafkaClientID       string `json:"kafka_client_id,omitempty"`
	AppPort             string `json:"app_port,omitempty"`
	PrometheusEnabled   bool   `json:"prometheus_enabled,omitempty"`
	InsecureSkipVerify  bool   `json:"insecure_skip_verify,omitempty"` // Http2 enforces to use certs, if it's true client no need to send key.
	AllowHttp           bool   `json:"allow_http,omitempty"`           // if url contains https, then also handled
	KeyFilePath         string `json:"key_file_path,omitempty"`        // if insecureskipverify false, key file path
	LogLevel            string `json:"log_level,omitempty"`
	CimFileLog          bool   `json:"cim_file_log,omitempty"`
	NumGarpCount        int    `json:"num_garp_count,omitempty"`
	RemoteSvcRetryCount int    `json:"remote_svc_retry_count,omitempty"`
	TTLTimeout          int    `json:"ttl_timeout,omitempty"`
}

type ConfigObj

type ConfigObj struct {
	CimConfig *CimConfig `json:"cimConfig"`
}
var (
	CimConfigObj       *ConfigObj
	NatsSubscribedSubj = make(map[string]bool)
)

type EventDetails

type EventDetails struct {
	EventName             string              `json:"eventName"`
	EventTime             int64               `json:"eventTime"`
	EventSourceType       string              `json:"eventSourceType,omitempty"`
	ManagedObject         []KeyValueObjects   `json:"managedObject"`
	AdditionalInfo        []KeyValueObjects   `json:"additionalInfo,omitempty"`
	ThresholdInfo         []KeyValueObjects   `json:"thresholdInfo,omitempty"`
	StateChangeDefinition []KeyValueObjects   `json:"stateChangeDefinition,omitempty"`
	MonitoredAttributes   []KeyValueObjects   `json:"monitoredAttributes,omitempty"`
	SourceHeaders         SourceHeaderDetails `json:"sourceHeaders"`
	ContainerId           string              `json:"containerId"`
	SourceName            string              `json:"sourceName,omitempty"`
	SourceID              string              `json:"sourceId,omitempty"`
}

type KeyValueObjects

type KeyValueObjects struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Lmaas

type Lmaas struct {
	MaxFileSizeInMB      int    `json:"max_file_size_in_mb"`
	MaxBackupFiles       int    `json:"max_backup_files"`
	MaxAge               int    `json:"max_age"`
	BufferSize           int    `json:"buffer_size"`
	FlushTimeout         int    `json:"flush_timeout"`
	LoggingMode          string `json:"logging_mode"`
	PreferLocalDeamonset bool   `json:"prefer_local_daemonset"`
}

type SourceHeaderDetails

type SourceHeaderDetails struct {
	PodUUID       string `json:"pod_uuid,omitempty"`
	UHN           string `json:"uhn,omitempty"`
	CNFCUUID      string `json:"cnfc_uuid,omitempty"`
	PodID         string `json:"podId"`
	Microservice  string `json:"microservice"`
	Nf            string `json:"nf"`
	NfPrefix      string `json:"nfPrefix"`
	NfType        string `json:"nfType"`
	SvcVersion    string `json:"svcVersion"`
	VendorID      string `json:"vendorId,omitempty"`
	XGVelaID      string `json:"xgvelaId,omitempty"`
	NfClass       string `json:"nfClass,omitempty"`
	NfID          string `json:"nfId,omitempty"`
	NfServiceID   string `json:"nfServiceId,omitempty"`
	NfServiceType string `json:"nfServiceType,omitempty"`
}

type Subjects

type Subjects struct {
	AppPort      int  `json:"app_port"`
	Http2Enabled bool `json:"http2_enabled"` // Http2 supported if true
}

type UserInput

type UserInput struct {
	Subject         []string
	QueueGroup      string
	MaxFileSizeMB   int
	MaxBackupFiles  int
	MaxAge          int
	BufSize         int
	PodID           string
	Namespace       string
	SubscriberCount int
	MsgCount        int
	FlushTimeout    time.Duration
}

UserInput details

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳