admin

package
v0.0.0-...-87df8d5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminClient

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

func (*AdminClient) CallServer

func (ac *AdminClient) CallServer(args ...string) (string, error)

CallServer call hadmin server command with args.

func (*AdminClient) CallStore

func (ac *AdminClient) CallStore(args ...string) (string, error)

CallStore call hadmin store command with args.

func (*AdminClient) GetHMetaStatus

func (ac *AdminClient) GetHMetaStatus() (status HMetaStatus, err error)

func (*AdminClient) MaintenanceStore

func (ac *AdminClient) MaintenanceStore(action MaintenanceAction, args ...string) (string, error)

type AdminClientProvider

type AdminClientProvider interface {
	GetAdminClient(hdb *hapi.HStreamDB) IAdminClient
}

AdminClientProvider provides an abstraction for creating clients that communicate with the HStreamDB cluster.

func NewAdminClientProvider

func NewAdminClientProvider(restConfig *rest.Config, log logr.Logger) AdminClientProvider

func NewMockAdminClientProvider

func NewMockAdminClientProvider(*rest.Config, logr.Logger) AdminClientProvider

NewMockAdminClientProvider generates a client provider for talking to real hStream.

type HMetaNode

type HMetaNode struct {
	Reachable bool
	Leader    bool
	Error     string
}

type HMetaStatus

type HMetaStatus struct {
	Nodes map[string]HMetaNode
}

func (*HMetaStatus) IsAllReady

func (rs *HMetaStatus) IsAllReady() bool

type IAdminClient

type IAdminClient interface {
	CallServer(args ...string) (string, error)
	CallStore(args ...string) (string, error)
	MaintenanceStore(action MaintenanceAction, args ...string) (string, error)
	GetHMetaStatus() (HMetaStatus, error)
}

func NewAdminClient

func NewAdminClient(hdb *hapi.HStreamDB, restConfig *rest.Config, log logr.Logger) IAdminClient

NewAdminClient generates an Admin client for a hStream

type MaintenanceAction

type MaintenanceAction string
const (
	MaintenanceActionApply MaintenanceAction = "apply"
)

Jump to

Keyboard shortcuts

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