daemon_handler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown     HealthEnum = "unknown"
	UnHealthy   HealthEnum = "unHealthy"
	Healthy     HealthEnum = "healthy"
	ReverseMode ModeEnum   = "reverse"
	ConnectMode ModeEnum   = "connect"
)

Variables

This section is empty.

Functions

func GetAllApplicationWithDefaultApp

func GetAllApplicationWithDefaultApp(namespace, kubeconfigPath string) []*appmeta.ApplicationMeta

GetAllApplicationWithDefaultApp will not to create default application if default application not found note: this func will return all app meta, includes invalid application(uninstalled)

func GetAllValidApplicationWithDefaultApp

func GetAllValidApplicationWithDefaultApp(ns string, KubeConfigBytes []byte) []*appmeta.ApplicationMeta

func GetDescriptionDaemon

func GetDescriptionDaemon(ns, appName string, kubeconfigBytes []byte) *profile.AppProfileV2

func GetReverseInfo

func GetReverseInfo() *sync.Map

func HandleGetResourceInfoRequest

func HandleGetResourceInfoRequest(request *command.GetResourceInfoCommand) (interface{}, error)

func HandleKubeconfigOperationRequest

func HandleKubeconfigOperationRequest(request *command.KubeconfigOperationCommand) error

HandleKubeconfigOperationRequest this method will operate informer cache, remove or add informer

func HandleSudoVPNOperate

func HandleSudoVPNOperate(cmd *command.VPNOperateCommand, writer io.WriteCloser) error

HandleSudoVPNOperate sudo daemon, vpn executor

func HandleSudoVPNStatus

func HandleSudoVPNStatus() (interface{}, error)

func HandleVPNOperate

func HandleVPNOperate(cmd *command.VPNOperateCommand, writer io.WriteCloser) (err error)

HandleVPNOperate not sudo daemon, vpn controller

func HandleVPNStatus

func HandleVPNStatus() (interface{}, error)

func InvalidCache

func InvalidCache(ns, nid, appName string)

func ParseApplicationsResult

func ParseApplicationsResult(namespace string, metas []*appmeta.ApplicationMeta) []*model.Namespace

func ReleaseWatcher

func ReleaseWatcher(kubeconfigBytes []byte, namespace string)

func SortApplication

func SortApplication(metas []*appmeta.ApplicationMeta)

func ToStatus

func ToStatus(m map[string]string) *status

Types

type AppNameAndNid

type AppNameAndNid struct {
	Name string
	Nid  string
}

type ConfigMapWatcher

type ConfigMapWatcher struct {
	// contains filtered or unexported fields
}

func GetOrGenerateConfigMapWatcher

func GetOrGenerateConfigMapWatcher(kubeconfigBytes []byte, namespace string, getter cache.Getter) *ConfigMapWatcher

func NewConfigMapWatcher

func NewConfigMapWatcher(kubeconfigBytes []byte, namespace string, getter cache.Getter) *ConfigMapWatcher

func (*ConfigMapWatcher) Start

func (w *ConfigMapWatcher) Start()

func (*ConfigMapWatcher) Stop

func (w *ConfigMapWatcher) Stop()

type ConnectInfo

type ConnectInfo struct {
	// contains filtered or unexported fields
}

func (*ConnectInfo) GetKubeconfig

func (c *ConnectInfo) GetKubeconfig() string

func (*ConnectInfo) GetNamespace

func (c *ConnectInfo) GetNamespace() string

func (*ConnectInfo) GetUid

func (c *ConnectInfo) GetUid() string

func (*ConnectInfo) IsEmpty

func (c *ConnectInfo) IsEmpty() bool

func (*ConnectInfo) IsSameCluster

func (c *ConnectInfo) IsSameCluster(kubeconfigBytes []byte) bool

func (*ConnectInfo) IsSameUid

func (c *ConnectInfo) IsSameUid(uid string) bool

func (ConnectInfo) Status

func (c ConnectInfo) Status() string

type ConnectTotal

type ConnectTotal struct {
	// contains filtered or unexported fields
}

func FromStringToConnectInfo

func FromStringToConnectInfo(str string) *ConnectTotal

func (*ConnectTotal) IsConnected

func (c *ConnectTotal) IsConnected() bool

func (*ConnectTotal) ToString

func (c *ConnectTotal) ToString() string

type HealthEnum

type HealthEnum string

func (HealthEnum) String

func (e HealthEnum) String() string

type ModeEnum

type ModeEnum string

func (ModeEnum) String

func (m ModeEnum) String() string

type ReverseRecord

type ReverseRecord struct {
	MacAddress string
	Resources  sets.String
}

func NewReverseRecord

func NewReverseRecord(resourceType, resourceName string) ReverseRecord

func NewReverseRecordWithWorkloads

func NewReverseRecordWithWorkloads(workloads string) *ReverseRecord

type ReverseTotal

type ReverseTotal struct {
	// contains filtered or unexported fields
}

func FromStringToReverseTotal

func FromStringToReverseTotal(s string) (t *ReverseTotal)

func (*ReverseTotal) AddRecord

func (t *ReverseTotal) AddRecord(records ...*ReverseRecord) *ReverseTotal

func (*ReverseTotal) GetBelongToMeResources

func (t *ReverseTotal) GetBelongToMeResources() Set

func (*ReverseTotal) LoadAndDeleteBelongToMeResources

func (t *ReverseTotal) LoadAndDeleteBelongToMeResources() Set

func (*ReverseTotal) RemoveRecord

func (t *ReverseTotal) RemoveRecord(records ...*ReverseRecord) *ReverseTotal

func (*ReverseTotal) ReversedResource

func (t *ReverseTotal) ReversedResource() sets.String

func (*ReverseTotal) ToString

func (t *ReverseTotal) ToString() string

type Set

type Set map[string]*resourceInfo

func NewSet

func NewSet(items ...*resourceInfo) Set

func NewSetByKeys

func NewSetByKeys(items ...string) Set

func (Set) Delete

func (s Set) Delete(items ...*resourceInfo) Set

func (Set) DeleteByKeys

func (s Set) DeleteByKeys(items ...string) Set

func (Set) ForEach

func (s Set) ForEach(f func(k string, v *resourceInfo))

func (Set) Get

func (s Set) Get(item string) *resourceInfo

func (Set) Has

func (s Set) Has(item *resourceInfo) bool

func (Set) HasKey

func (s Set) HasKey(item string) bool

func (Set) Insert

func (s Set) Insert(items ...*resourceInfo) Set

func (Set) InsertByKeys

func (s Set) InsertByKeys(items ...string) Set

func (Set) KeySet

func (s Set) KeySet() []string

func (Set) Len

func (s Set) Len() int

func (Set) List

func (s Set) List() []*resourceInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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