infinispan

package
v0.0.0-...-46ee869 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManagerInfo

type CacheManagerInfo struct {
	Coordinator bool           `json:"coordinator"`
	SitesView   *[]interface{} `json:"sites_view,omitempty"`
}

func (CacheManagerInfo) GetSitesView

func (i CacheManagerInfo) GetSitesView() (map[string]bool, error)

type Cluster

type Cluster struct {
	Kubernetes *kube.Kubernetes
	Client     ispnclient.HttpClient
	Namespace  string
}

Cluster abstracts interaction with an Infinispan cluster

func NewCluster

func NewCluster(username, password, namespace string, protocol string, kubernetes *kube.Kubernetes) *Cluster

NewCluster creates a new instance of Cluster

func NewClusterNoAuth

func NewClusterNoAuth(namespace string, protocol string, kubernetes *kube.Kubernetes) *Cluster

NewClusterNoAuth creates a new instance of Cluster without authentication

func (Cluster) CacheNames

func (c Cluster) CacheNames(podName string) (caches []string, err error)

CacheNames return the names of the cluster caches available on the pod `podName`

func (Cluster) CreateCacheWithTemplate

func (c Cluster) CreateCacheWithTemplate(cacheName, cacheXML, podName string) error

CreateCacheWithTemplate create cluster cache on the pod `podName`

func (Cluster) CreateCacheWithTemplateName

func (c Cluster) CreateCacheWithTemplateName(cacheName, templateName, podName string) error

CreateCacheWithTemplateName create cluster cache on the pod `podName`

func (Cluster) ExistsCache

func (c Cluster) ExistsCache(cacheName, podName string) (bool, error)

ExistsCache returns true if cacheName cache exists on the podName pod

func (Cluster) GetCacheManagerInfo

func (c Cluster) GetCacheManagerInfo(cacheManagerName, podName string) (info *CacheManagerInfo, err error)

GetCacheManagerInfo via REST v2 interface

func (Cluster) GetClusterMembers

func (c Cluster) GetClusterMembers(podName string) (members []string, err error)

GetClusterMembers get the cluster members as seen by a given pod

func (Cluster) GetClusterSize

func (c Cluster) GetClusterSize(podName string) (int, error)

GetClusterSize returns the size of the cluster as seen by a given pod

func (Cluster) GetLoggers

func (c Cluster) GetLoggers(podName string) (lm map[string]string, err error)

func (Cluster) GetMaxMemoryUnboundedBytes

func (c Cluster) GetMaxMemoryUnboundedBytes(podName string) (uint64, error)

func (Cluster) GetMemoryLimitBytes

func (c Cluster) GetMemoryLimitBytes(podName string) (uint64, error)

func (Cluster) GetMetrics

func (c Cluster) GetMetrics(podName, postfix string) (buf *bytes.Buffer, err error)

GetMetrics return pod metrics

func (Cluster) GracefulShutdown

func (c Cluster) GracefulShutdown(podName string) error

GracefulShutdown performs clean cluster shutdown

func (Cluster) SetLogger

func (c Cluster) SetLogger(podName, loggerName, loggerLevel string) error

type ClusterHealth

type ClusterHealth struct {
	Nodes []string `json:"node_names"`
}

ClusterHealth represents the health of the cluster

type ClusterInterface

type ClusterInterface interface {
	GetClusterSize(podName string) (int, error)
	GracefulShutdown(podName string) error
	GetClusterMembers(podName string) ([]string, error)
	ExistsCache(cacheName, podName string) (bool, error)
	CreateCacheWithTemplate(cacheName, cacheXML, podName string) error
	CreateCacheWithTemplateName(cacheName, templateName, podName string) error
	GetMemoryLimitBytes(podName string) (uint64, error)
	GetMaxMemoryUnboundedBytes(podName string) (uint64, error)
	CacheNames(podName string) ([]string, error)
	GetMetrics(podName, postfix string) (*bytes.Buffer, error)
	GetCacheManagerInfo(cacheManagerName, podName string) (*CacheManagerInfo, error)
	GetLoggers(podName string) (map[string]string, error)
	SetLogger(podName, loggerName, loggerLevel string) error
}

ClusterInterface represents the interface of a Cluster instance

type Health

type Health struct {
	ClusterHealth ClusterHealth `json:"cluster_health"`
}

Health represents the health of an Infinispan server

type Logger

type Logger struct {
	Name  string `json:"name"`
	Level string `json:"level"`
}

Directories

Path Synopsis
client

Jump to

Keyboard shortcuts

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