Documentation ¶
Index ¶
- Constants
- Variables
- func ErrApplyHelmChart(err error) error
- func ErrCreateData(err error) error
- func ErrDeleteData(err error) error
- func ErrMeshSyncEventsSubscription(err error) error
- func ErrMesheryClient(err error) error
- func ErrMesheryControllersStatusSubscription(err error) error
- func ErrMeshsyncSubscription(err error) error
- func ErrPublishBroker(err error) error
- func ErrQuery(err error) error
- func ErrSubscribeChannel(err error) error
- func ErrUpdateData(err error) error
- func GetOperator(kubeclient *mesherykube.Client) (string, string, error)
- func Initialize(client *mesherykube.Client, delete bool, ...) error
- func ListernToEvents(log logger.Handler, handler *database.Handler, datach chan *broker.Message, ...)
- func PersistClusterNames(ctx context.Context, log logger.Handler, handler *database.Handler, ...)
- func SelectivelyFetchNamespaces(cids []string, provider models.Provider) ([]string, error)
- func SetOverrideValues(delete bool, adapterTracker models.AdaptersTrackerInterface) map[string]interface{}
- func SubscribeToBroker(_ models.Provider, mesheryKubeClient *mesherykube.Client, ...) (string, error)
- type AdapterStatusInput
- type AddonList
- type AddonStatusInput
- type ApplicationPage
- type ApplicationResult
- type CatalogFilter
- type CatalogPattern
- type CatalogSelector
- type ClusterResources
- type ConfigurationPage
- type Connections
- type Container
- type ContainerPort
- type ContainerStatus
- type ControlPlane
- type ControlPlaneMember
- type DataPlane
- type Error
- type Event
- type FilterPage
- type FilterResult
- type K8sConnectionTracker
- func (k *K8sConnectionTracker) Get(id string) (url string)
- func (k *K8sConnectionTracker) ListBrokerEndpoints() (a []string)
- func (k *K8sConnectionTracker) Log(l logger.Handler)
- func (k *K8sConnectionTracker) ResetEndpoints(available map[string]bool)
- func (k *K8sConnectionTracker) Set(id string, url string)
- type K8sContext
- type K8sContextsPage
- type KctlDescribeDetails
- type Location
- type MeshModelComponent
- type MeshModelRelationship
- type MeshModelSummary
- type MeshModelSummarySelector
- type MeshSyncEvent
- type MeshType
- type MesheryController
- type MesheryControllerStatus
- type MesheryControllersStatusListItem
- type MesheryResult
- type NameSpace
- type NullString
- type OAMCapability
- type OperatorControllerStatus
- func GetBrokerInfo(_ operatorClient.Interface, mesheryKubeClient *mesherykube.Client, ...) (OperatorControllerStatus, error)
- func GetControllersInfo(mesheryKubeClient *mesherykube.Client, brokerConn brokerpkg.Handler) ([]*OperatorControllerStatus, error)
- func GetMeshSyncInfo(_ operatorClient.Interface, mesheryKubeClient *mesherykube.Client) (OperatorControllerStatus, error)
- type OperatorControllerStatusPerK8sContext
- type OperatorStatus
- type OperatorStatusInput
- type OperatorStatusPerK8sContext
- type PageFilter
- type PatternPageResult
- type PatternResult
- type PerfPageProfiles
- type PerfPageResult
- type PerfProfile
- type ReSyncActions
- type Resource
- type ServiceMeshFilter
- type Severity
- type Status
- type TelemetryComp
Constants ¶
const ( ErrNilClientCode = "1300" ErrCreateDataCode = "1301" ErrQueryCode = "1302" ErrMeshsyncSubscriptionCode = "1303" ErrMesheryClientCode = "1304" ErrSubscribeChannelCode = "1305" ErrPublishBrokerCode = "1306" ErrEmptyHandlerCode = "1307" ErrApplyHelmChartCode = "1308" ErrMesheryControllersStatusSubscriptionCode = "1309" ErrMeshSyncEventsSubscriptionCode = "1310" ErrMesheryClientNilCode = "1311" ErrUpdateDataCode = "1312" ErrDeleteDataCode = "1313" )
Please reference the following before contributing an error code: https://docs.meshery.io/project/contributing/contributing-error https://github.com/meshery/meshkit/blob/master/errors/errors.go
const ( Namespace = "meshery" RequestSubject = "meshery.meshsync.request" MeshsyncSubject = "meshery.meshsync.core" BrokerQueue = "meshery" MeshSyncBrokerConnection = "meshsync" )
Variables ¶
var ( ErrEmptyHandler = errors.New(ErrEmptyHandlerCode, errors.Alert, []string{"Database handler not initialized"}, []string{"Meshery Database handler is not accessible to perform operations"}, []string{"Meshery Database is crashed or not reachable"}, []string{"Restart Meshery Server", "Please check if Meshery server is accessible to the Database"}) ErrMesheryClientNil = errors.New(ErrMesheryClientNilCode, errors.Alert, []string{"Meshery kubernetes client not initialized"}, []string{"Kubernetes config is not initialized with Meshery 2"}, []string{}, []string{"Upload your kubernetes config via the settings dashboard. If uploaded, wait for a minute for it to get initialized"}) )
var AllMeshType = []MeshType{ MeshTypeAllMesh, MeshTypeInvalidMesh, MeshTypeAppMesh, MeshTypeCitrixServiceMesh, MeshTypeConsul, MeshTypeIstio, MeshTypeKuma, MeshTypeLinkerd, MeshTypeTraefikMesh, MeshTypeOctarine, MeshTypeNetworkServiceMesh, MeshTypeTanzu, MeshTypeOpenServiceMesh, MeshTypeNginxServiceMesh, MeshTypeCiliumServiceMesh, }
var AllMesheryController = []MesheryController{ MesheryControllerBroker, MesheryControllerOperator, MesheryControllerMeshsync, }
var AllMesheryControllerStatus = []MesheryControllerStatus{ MesheryControllerStatusDeployed, MesheryControllerStatusNotdeployed, MesheryControllerStatusDeploying, MesheryControllerStatusUnkown, }
var AllSeverity = []Severity{ SeverityAlert, SeverityCritical, SeverityDebug, SeverityEmergency, SeverityError, SeverityWarning, SeverityInformational, }
var AllStatus = []Status{ StatusEnabled, StatusConnected, StatusDisabled, StatusProcessing, StatusUnknown, }
Functions ¶
func ErrApplyHelmChart ¶
ErrApplyHelmChart is the error which occurs while applying helm chart
func ErrCreateData ¶
func ErrDeleteData ¶
func ErrMesheryClient ¶
func ErrMeshsyncSubscription ¶
func ErrPublishBroker ¶
func ErrSubscribeChannel ¶
func ErrUpdateData ¶
func GetOperator ¶
func GetOperator(kubeclient *mesherykube.Client) (string, string, error)
func Initialize ¶
func Initialize(client *mesherykube.Client, delete bool, adapterTracker models.AdaptersTrackerInterface) error
func ListernToEvents ¶
func ListernToEvents(log logger.Handler, handler *database.Handler, datach chan *broker.Message, meshsyncCh chan struct{}, broadcast broadcast.Broadcaster, )
listernToEvents - scale this function with the number of channels
func PersistClusterNames ¶
func SelectivelyFetchNamespaces ¶ added in v0.6.3
SelectivelyFetchNamespaces fetches the an array of namespaces from DB based on ClusterIDs (or KubernetesServerIDs) passed as param
func SetOverrideValues ¶
func SetOverrideValues(delete bool, adapterTracker models.AdaptersTrackerInterface) map[string]interface{}
to be depricated
func SubscribeToBroker ¶
Types ¶
type AdapterStatusInput ¶ added in v0.6.82
type AddonStatusInput ¶
type ApplicationPage ¶
type ApplicationPage struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` Applications []*ApplicationResult `json:"applications,omitempty"` }
type ApplicationResult ¶
type ApplicationResult struct { ID string `json:"id"` Name string `json:"name"` ApplicationFile string `json:"application_file"` Type *NullString `json:"type"` UserID string `json:"user_id"` Location *Location `json:"location"` Visibility string `json:"visibility"` CreatedAt *string `json:"created_at,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` }
type CatalogFilter ¶ added in v0.6.4
type CatalogFilter struct { ID string `json:"id"` Name string `json:"name"` FilterFile string `json:"filter_file"` UserID string `json:"user_id"` Location *Location `json:"location"` FilterResource string `json:"filter_resource"` Visibility string `json:"visibility"` CatalogData map[string]interface{} `json:"catalog_data,omitempty"` CreatedAt *string `json:"created_at,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` }
type CatalogPattern ¶ added in v0.6.4
type CatalogPattern struct { ID string `json:"id"` Name string `json:"name"` UserID string `json:"user_id"` PatternFile string `json:"pattern_file"` Location *Location `json:"location"` Visibility string `json:"visibility"` CatalogData map[string]interface{} `json:"catalog_data,omitempty"` CreatedAt *string `json:"created_at,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` }
type CatalogSelector ¶ added in v0.6.4
type ClusterResources ¶
type ClusterResources struct {
Resources []*Resource `json:"resources"`
}
type ConfigurationPage ¶
type ConfigurationPage struct { Applications *ApplicationPage `json:"applications,omitempty"` Patterns *PatternPageResult `json:"patterns,omitempty"` Filters *FilterPage `json:"filters,omitempty"` }
type Connections ¶ added in v0.6.55
type Connections struct {
Connections []connection `json:"connections"`
}
type Container ¶
type Container struct { ControlPlaneMemberName string `json:"controlPlaneMemberName"` ContainerName string `json:"containerName"` Image string `json:"image"` Status *ContainerStatus `json:"status,omitempty"` Ports []*ContainerPort `json:"ports,omitempty"` Resources interface{} `json:"resources,omitempty"` }
type ContainerPort ¶
type ContainerStatus ¶
type ContainerStatus struct { ContainerStatusName string `json:"containerStatusName"` Image string `json:"image"` State interface{} `json:"state,omitempty"` LastState interface{} `json:"lastState,omitempty"` Ready bool `json:"ready"` RestartCount interface{} `json:"restartCount,omitempty"` Started bool `json:"started"` ImageID interface{} `json:"imageID,omitempty"` ContainerID interface{} `json:"containerID,omitempty"` }
type ControlPlane ¶
type ControlPlane struct { Name string `json:"name"` Members []*ControlPlaneMember `json:"members"` }
func GetControlPlaneState ¶
type ControlPlaneMember ¶
type Event ¶ added in v0.6.135
type Event struct { ID string `json:"id"` UserID string `json:"userID"` ActedUpon string `json:"actedUpon"` OperationID string `json:"operationID"` SystemID string `json:"systemID"` Severity Severity `json:"severity"` Action string `json:"action"` Category string `json:"category"` Description string `json:"description"` Metadata map[string]interface{} `json:"metadata,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt,omitempty"` }
type FilterPage ¶
type FilterPage struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` Filters []*FilterResult `json:"filters,omitempty"` }
type FilterResult ¶
type FilterResult struct { ID string `json:"id"` Name string `json:"name"` FilterFile string `json:"filter_file"` FilterResource string `json:"filter_resource"` UserID string `json:"user_id"` Location *Location `json:"location"` Visibility string `json:"visibility"` CatalogData map[string]interface{} `json:"catalog_data,omitempty"` CreatedAt *string `json:"created_at,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` }
type K8sConnectionTracker ¶
type K8sConnectionTracker struct {
// contains filtered or unexported fields
}
K8sConnectionTracker keeps track of BrokerURLs per kubernetes context
func NewK8sConnctionTracker ¶
func NewK8sConnctionTracker() *K8sConnectionTracker
func (*K8sConnectionTracker) Get ¶
func (k *K8sConnectionTracker) Get(id string) (url string)
func (*K8sConnectionTracker) ListBrokerEndpoints ¶
func (k *K8sConnectionTracker) ListBrokerEndpoints() (a []string)
func (*K8sConnectionTracker) Log ¶
func (k *K8sConnectionTracker) Log(l logger.Handler)
Takes the meshkit Logger and logs a comma separated list of currently tracked Broker Endpoints
func (*K8sConnectionTracker) ResetEndpoints ¶
func (k *K8sConnectionTracker) ResetEndpoints(available map[string]bool)
Takes a set of endpoints and discard the current endpoint if its not present in the set
func (*K8sConnectionTracker) Set ¶
func (k *K8sConnectionTracker) Set(id string, url string)
type K8sContext ¶
type K8sContext struct { ID string `json:"id"` Name string `json:"name"` Auth map[string]interface{} `json:"auth"` Cluster map[string]interface{} `json:"cluster"` Server string `json:"server"` Owner string `json:"owner"` CreatedBy string `json:"created_by"` MesheryInstanceID string `json:"meshery_instance_id"` KubernetesServerID string `json:"kubernetes_server_id"` DeploymentType string `json:"deployment_type"` Version string `json:"version"` UpdatedAt string `json:"updated_at"` CreatedAt string `json:"created_at"` ConnectionID string `json:"connection_id"` }
type K8sContextsPage ¶
type K8sContextsPage struct { TotalCount int `json:"total_count"` Contexts []*K8sContext `json:"contexts"` }
type KctlDescribeDetails ¶
type MeshModelComponent ¶ added in v0.6.46
type MeshModelRelationship ¶ added in v0.6.46
type MeshModelSummary ¶ added in v0.6.46
type MeshModelSummary struct { Components []*MeshModelComponent `json:"components,omitempty"` Relationships []*MeshModelRelationship `json:"relationships,omitempty"` }
type MeshModelSummarySelector ¶ added in v0.6.46
type MeshModelSummarySelector struct {
Type string `json:"type"`
}
type MeshSyncEvent ¶
type MeshType ¶
type MeshType string
const ( MeshTypeAllMesh MeshType = "ALL_MESH" MeshTypeInvalidMesh MeshType = "INVALID_MESH" MeshTypeAppMesh MeshType = "APP_MESH" MeshTypeCitrixServiceMesh MeshType = "CITRIX_SERVICE_MESH" MeshTypeConsul MeshType = "CONSUL" MeshTypeIstio MeshType = "ISTIO" MeshTypeKuma MeshType = "KUMA" MeshTypeLinkerd MeshType = "LINKERD" MeshTypeTraefikMesh MeshType = "TRAEFIK_MESH" MeshTypeOctarine MeshType = "OCTARINE" MeshTypeNetworkServiceMesh MeshType = "NETWORK_SERVICE_MESH" MeshTypeTanzu MeshType = "TANZU" MeshTypeOpenServiceMesh MeshType = "OPEN_SERVICE_MESH" MeshTypeNginxServiceMesh MeshType = "NGINX_SERVICE_MESH" MeshTypeCiliumServiceMesh MeshType = "CILIUM_SERVICE_MESH" )
func (MeshType) MarshalGQL ¶
func (*MeshType) UnmarshalGQL ¶
type MesheryController ¶
type MesheryController string
const ( MesheryControllerBroker MesheryController = "BROKER" MesheryControllerOperator MesheryController = "OPERATOR" MesheryControllerMeshsync MesheryController = "MESHSYNC" )
func GetInternalController ¶
func GetInternalController(controller models.MesheryController) MesheryController
func (MesheryController) IsValid ¶
func (e MesheryController) IsValid() bool
func (MesheryController) MarshalGQL ¶
func (e MesheryController) MarshalGQL(w io.Writer)
func (MesheryController) String ¶
func (e MesheryController) String() string
func (*MesheryController) UnmarshalGQL ¶
func (e *MesheryController) UnmarshalGQL(v interface{}) error
type MesheryControllerStatus ¶
type MesheryControllerStatus string
const ( MesheryControllerStatusDeployed MesheryControllerStatus = "DEPLOYED" MesheryControllerStatusNotdeployed MesheryControllerStatus = "NOTDEPLOYED" MesheryControllerStatusDeploying MesheryControllerStatus = "DEPLOYING" MesheryControllerStatusUnkown MesheryControllerStatus = "UNKOWN" )
func GetInternalControllerStatus ¶
func GetInternalControllerStatus(status controllers.MesheryControllerStatus) MesheryControllerStatus
func (MesheryControllerStatus) IsValid ¶
func (e MesheryControllerStatus) IsValid() bool
func (MesheryControllerStatus) MarshalGQL ¶
func (e MesheryControllerStatus) MarshalGQL(w io.Writer)
func (MesheryControllerStatus) String ¶
func (e MesheryControllerStatus) String() string
func (*MesheryControllerStatus) UnmarshalGQL ¶
func (e *MesheryControllerStatus) UnmarshalGQL(v interface{}) error
type MesheryControllersStatusListItem ¶
type MesheryControllersStatusListItem struct { ContextID string `json:"contextId"` Controller MesheryController `json:"controller"` Status MesheryControllerStatus `json:"status"` }
type MesheryResult ¶
type MesheryResult struct { MesheryID *string `json:"meshery_id,omitempty"` Name *string `json:"name,omitempty"` Mesh *string `json:"mesh,omitempty"` PerformanceProfile *string `json:"performance_profile,omitempty"` TestID *string `json:"test_id,omitempty"` RunnerResults map[string]interface{} `json:"runner_results,omitempty"` ServerMetrics *string `json:"server_metrics,omitempty"` ServerBoardConfig *string `json:"server_board_config,omitempty"` TestStartTime *string `json:"test_start_time,omitempty"` UserID *string `json:"user_id,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` CreatedAt *string `json:"created_at,omitempty"` }
type NullString ¶
type OAMCapability ¶
type OAMCapability struct { OamDefinition interface{} `json:"oam_definition,omitempty"` ID *string `json:"id,omitempty"` OamRefSchema *string `json:"oam_ref_schema,omitempty"` Host *string `json:"host,omitempty"` Restricted *bool `json:"restricted,omitempty"` Metadata interface{} `json:"metadata,omitempty"` }
type OperatorControllerStatus ¶
type OperatorControllerStatus struct { Name string `json:"name"` Version string `json:"version"` Status Status `json:"status"` Error *Error `json:"error,omitempty"` ContextID string `json:"contextID"` }
func GetBrokerInfo ¶
func GetBrokerInfo(_ operatorClient.Interface, mesheryKubeClient *mesherykube.Client, _ brokerpkg.Handler) (OperatorControllerStatus, error)
func GetControllersInfo ¶
func GetControllersInfo(mesheryKubeClient *mesherykube.Client, brokerConn brokerpkg.Handler) ([]*OperatorControllerStatus, error)
func GetMeshSyncInfo ¶
func GetMeshSyncInfo(_ operatorClient.Interface, mesheryKubeClient *mesherykube.Client) (OperatorControllerStatus, error)
type OperatorControllerStatusPerK8sContext ¶
type OperatorControllerStatusPerK8sContext struct { ContextID string `json:"contextID"` OperatorControllerStatus *OperatorControllerStatus `json:"OperatorControllerStatus"` }
type OperatorStatus ¶
type OperatorStatus struct { Status Status `json:"status"` Version string `json:"version"` Controllers []*OperatorControllerStatus `json:"controllers"` Error *Error `json:"error,omitempty"` ContextID string `json:"contextID"` }
type OperatorStatusInput ¶
type OperatorStatusPerK8sContext ¶
type OperatorStatusPerK8sContext struct { ContextID string `json:"contextID"` OperatorStatus *OperatorStatus `json:"operatorStatus"` }
type PageFilter ¶
type PatternPageResult ¶
type PatternPageResult struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` Patterns []*PatternResult `json:"patterns,omitempty"` }
type PatternResult ¶
type PatternResult struct { ID string `json:"id"` Name string `json:"name"` UserID string `json:"user_id"` Location *Location `json:"location"` PatternFile string `json:"pattern_file"` Visibility string `json:"visibility"` CatalogData map[string]interface{} `json:"catalog_data,omitempty"` CanSupport bool `json:"canSupport"` Errmsg *string `json:"errmsg,omitempty"` CreatedAt *string `json:"created_at,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` }
type PerfPageProfiles ¶
type PerfPageProfiles struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` Profiles []*PerfProfile `json:"profiles,omitempty"` }
type PerfPageResult ¶
type PerfPageResult struct { Page int `json:"page"` PageSize int `json:"page_size"` TotalCount int `json:"total_count"` Results []*MesheryResult `json:"results,omitempty"` }
type PerfProfile ¶
type PerfProfile struct { ConcurrentRequest int `json:"concurrent_request"` CreatedAt *string `json:"created_at,omitempty"` Duration string `json:"duration"` Endpoints []*string `json:"endpoints,omitempty"` ID string `json:"id"` LastRun *string `json:"last_run,omitempty"` LoadGenerators []*string `json:"load_generators,omitempty"` Name *string `json:"name,omitempty"` QPS *int `json:"qps,omitempty"` TotalResults *int `json:"total_results,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` UserID string `json:"user_id"` RequestHeaders *string `json:"request_headers,omitempty"` RequestCookies *string `json:"request_cookies,omitempty"` RequestBody *string `json:"request_body,omitempty"` ContentType *string `json:"content_type,omitempty"` ServiceMesh *string `json:"service_mesh,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type ReSyncActions ¶
type ServiceMeshFilter ¶
type Severity ¶ added in v0.6.135
type Severity string