service

package
v0.0.0-...-599ae38 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

View Source
const (
	CLUSTER  = "/clusters/"
	DETECTOR = "/detector/"
)
View Source
const (
	KeyPath     = "/theliv/clusters/"
	KubeConfKey = "/kubeconf"
	BasicKey    = "/basic"

	TokenTemplate = `` /* 307-byte string literal not displayed */

	BasicTemplate = `` /* 152-byte string literal not displayed */

)
View Source
const SEPARATOR = ","

Variables

This section is empty.

Functions

func AddGroup

func AddGroup(cluster string, namespace string, roles []string) (err error)

This function will add 2 new path, into every role.

func AddPath

func AddPath(roleName string, newPaths []string) (err error)

This function will insert new Role kv into database, if key not found. If KV exists in database, append newly added path. Value in database is string format, a collection seperated by ",". If database operation failed, return error, else return nil.

func DetectAlerts

func DetectAlerts(ctx context.Context) (interface{}, error)

func GetClusters

func GetClusters(ctx context.Context) ([]string, error)

func GetDetectorInput

func GetDetectorInput(ctx context.Context) *problem.DetectorCreationInput

func GetEvents

func GetEvents(ctx context.Context) (interface{}, error)

func ListNs

func ListNs(ctx context.Context, clusterName string) ([]string, error)

func RegisterCluster

func RegisterCluster(ctx context.Context, basic ClusterBasic) error

Insert or update 1 record, to /theliv/clusters/{name}/kubeconf.

func RemoveGroup

func RemoveGroup(cluster string, namespace string, roles []string) (err error)

This function will remove 2 path, from every role.

func RemovePath

func RemovePath(roleName string, rmvPath []string) (err error)

Remove path from existing role

Types

type ClusterBasic

type ClusterBasic struct {
	Url     string
	CA      string
	Name    string
	Token   string
	Account string
	Region  string
}

type ContextKey

type ContextKey int
const (
	DetecotrInputKey ContextKey = iota
)

Jump to

Keyboard shortcuts

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