Documentation
¶
Index ¶
- func ArrContains(a, b []string) bool
- func CalculatePercentageInt32(part, total int32) int32
- func DecodeString(content string, keyVal map[string]string) string
- func GetFromContext(ctx context.Context) map[string]string
- func GetFromContextByKey(ctx context.Context, key MatedataKey) string
- func GetLogFilePath() string
- func GetServerStoragePathByNames(packageNames ...string) string
- func IsValidKubernetesName(name string) bool
- func MapToString(m map[string]string) string
- func Md5(str string) string
- func NewLog(conf *conf.Bootstrap) *logtool
- func RemoveDuplicatesInt64(slice []int64) []int64
- func StringToMap(s string) map[string]string
- func StructTransform(a, b proto.Message) error
- type GrpcConn
- type MatedataKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrContains ¶
func GetFromContextByKey ¶
func GetFromContextByKey(ctx context.Context, key MatedataKey) string
func GetLogFilePath ¶
func GetLogFilePath() string
func IsValidKubernetesName ¶
check string '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
func MapToString ¶
MapToString converts a map[string]string to a comma-separated string
func RemoveDuplicatesInt64 ¶
func StringToMap ¶
StringToMap converts a comma-separated string back to map[string]string
func StructTransform ¶
Types ¶
type GrpcConn ¶
type GrpcConn struct { Conn *grpcConnect.ClientConn Ctx context.Context }
type MatedataKey ¶
type MatedataKey string
const ( ServiceNameKey MatedataKey = "service" ServiceVersionKey MatedataKey = "version" RuntimeKey MatedataKey = "runtime" OSKey MatedataKey = "os" ArchKey MatedataKey = "arch" ConfKey MatedataKey = "conf" ConfDirKey MatedataKey = "confdir" )
func (MatedataKey) String ¶
func (m MatedataKey) String() string
Click to show internal directories.
Click to hide internal directories.