session

package
v0.0.0-...-c6ba9ae Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplaySession

func DisplaySession()

func GetActiveClusterName

func GetActiveClusterName() string

func GetCurrentSession

func GetCurrentSession() *session

func InitAPI

func InitAPI() error

func ListClusters

func ListClusters()

func Login

func Login()

func LoginWithParams

func LoginWithParams(brokers []string, version string, clusterName string) (bool, string)

func Logout

func Logout(clusterName string) bool

func SelectCluster

func SelectCluster(clusterName string)

Types

type ClusterConnection

type ClusterConnection struct {
	Name            string   `json:"name"`
	Brokers         []string `json:"brokers"`
	Version         string   `json:"version"`
	IsAuthenticated bool     `json:"isAuthenticated"`
}

func GetClusterByName

func GetClusterByName(clusterName string) *ClusterConnection

func GetClusterConnections

func GetClusterConnections() []ClusterConnection

type Session

type Session interface {
	Info() string
	Connect(ctx context.Context) (sarama.Client, error)
	Disconnect()
	GetClient() (sarama.Client, error)
	GetAdminClient() (sarama.ClusterAdmin, error)
	IsAuthenticated() bool
}

type SessionData

type SessionData struct {
	Clusters      []ClusterConnection `json:"clusters"`
	ActiveCluster string              `json:"activeCluster"`
}

Jump to

Keyboard shortcuts

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