util

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNumberOfCollector added in v0.2.8

func CalculateNumberOfCollector(topicCount int, maxHostCount int) int

func CheckMCISType added in v0.5.2

func CheckMCISType(serviceType string) bool

func CheckMCK8SType added in v0.5.2

func CheckMCK8SType(serviceType string) bool

func DeploymentTemplate added in v0.4.4

func DeploymentTemplate(deploymentName string, collectorCreateOrder int, collectorUUID string, env []apiv1.EnvVar, collectorImage string) *appsv1.Deployment

func GetAllTopicBySort added in v0.2.8

func GetAllTopicBySort(topicsSlice []string) []string

func GetCspCollectorIdx added in v0.4.4

func GetCspCollectorIdx(topic string) (collectorIdx int)

func GetFields

func GetFields(val reflect.Value) []string

func GetLogger added in v0.3.5

func GetLogger() *logrus.Logger

func GetMCK8SRingQueue added in v0.5.2

func GetMCK8SRingQueue() *queue.Queue

func GetProtocolDomainPort added in v0.6.10

func GetProtocolDomainPort(url string) (protocol string, domain string, port string, err error)

func GetRingQueue added in v0.4.4

func GetRingQueue() *queue.Queue

func Int32Ptr added in v0.4.4

func Int32Ptr(i int32) *int32

func Int64Ptr added in v0.4.4

func Int64Ptr(i int64) *int64

func MakeCollectorTopicMap added in v0.2.8

func MakeCollectorTopicMap(allTopics []string, maxHostCount int) (map[int][]string, []int)

func MergeTopicsToOneString added in v0.2.8

func MergeTopicsToOneString(topicsSlice []string) string

func PutMCK8SRingQueue added in v0.5.2

func PutMCK8SRingQueue(topicManagePolicy string, topic string) error

func ReturnDiffTopicList added in v0.2.8

func ReturnDiffTopicList(a, b []string) (diff []string)

func RingQueuePut added in v0.4.4

func RingQueuePut(topicManagePolicy string, topic string) error

func RunCommand

func RunCommand(vmIP string, userName string, privateKey string, cmd string) (*string, error)

func SplitOneStringToTopicsSlice added in v0.2.8

func SplitOneStringToTopicsSlice(topicsStrings string) []string

func StructToMap

func StructToMap(i interface{}) (values url.Values)

func ToFixed added in v0.4.4

func ToFixed(num float64, precision int) float64

func ToMap

func ToMap(val interface{}) (map[string]interface{}, error)

func Unique added in v0.4.4

func Unique(slice []string, sortOption bool) []string

Types

type TopicStructure added in v0.4.4

type TopicStructure struct {
	Policy string
	Topic  string
}

Jump to

Keyboard shortcuts

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