management

package
v0.0.0-...-fc29aca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: UPL-1.0 Imports: 12 Imported by: 0

Documentation

Overview

Package management contains types and functions for working with Coherence management over REST.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PodExec

func PodExec(ctx context.Context, req *ExecRequest, config *rest.Config) (int, string, string, error)

PodExec executes a command in a Pod.

Types

type ClusterData

type ClusterData struct {
	Links         []map[string]string `json:"Links"`
	RefreshTime   string              `json:"refreshTime"`
	LicenseMode   string              `json:"licenseMode"`
	ClusterSize   int                 `json:"clusterSize"`
	LocalMemberID int                 `json:"localMemberId"`
	Version       string              `json:"version"`
	Running       bool                `json:"running"`
	ClusterName   string              `json:"clusterName"`
}

ClusterData is a struct to use to hold the results of a generic Coherence management REST cluster query.

func GetCluster

func GetCluster(cl *http.Client, host string, port int32) (*ClusterData, int, error)

GetCluster performs a Management over REST cluster query http://localhost:30000/management/coherence/cluster and return the results, the http response status and any error.

type ExecRequest

type ExecRequest struct {
	Pod       string
	Container string
	Namespace string
	Command   []string
	Arg       []string
	Timeout   time.Duration
}

type MemberData

type MemberData struct {
	Links        []map[string]string `json:"Links"`
	SiteName     string              `json:"siteName"`
	RackName     string              `json:"rackName"`
	MachineName  string              `json:"machineName"`
	MachineID    int                 `json:"machineId"`
	MemberName   string              `json:"memberName"`
	RoleName     string              `json:"roleName"`
	ID           int                 `json:"id"`
	NodeID       string              `json:"nodeId"`
	LoggingLevel int                 `json:"loggingLevel"`
}

MemberData is a struct to use to hold the results of a Coherence management REST member query. http://localhost:30000/management/coherence/cluster/members/<member-id> This structure only contains a sub-set of the fields available in the response json. If other fields are required they should be added to this struct.

type MembersData

type MembersData struct {
	Links []map[string]string `json:"Links"`
	Items []MemberData
}

MembersData is a struct to use to hold the results of a Coherence management REST members query http://localhost:30000/management/coherence/cluster/members

func GetMembers

func GetMembers(cl *http.Client, host string, port int32) (*MembersData, int, error)

GetMembers performs a Management over REST members query http://localhost:30000/management/coherence/cluster/members and return the results, the http response status and any error.

type PartitionData

type PartitionData struct {
	Links                      []map[string]string `json:"Links"`
	HAStatus                   string              `json:"HAStatus"`
	HAStatusCode               int                 `json:"HAStatusCode"`
	RemainingDistributionCount int                 `json:"remainingDistributionCount"`
	BackupCount                int                 `json:"backupCount"`
	ServiceNodeCount           int                 `json:"serviceNodeCount"`
}

PartitionData is a struct to use to hold the results of a Coherence management REST partition assignment query http://localhost:30000/management/coherence/cluster/services/%s/partition This structure only contains a sub-set of the fields available in the response json. If other fields are required they should be added to this struct.

func GetPartitionAssignment

func GetPartitionAssignment(cl *http.Client, host string, port int32, service string) (*PartitionData, int, error)

GetPartitionAssignment performs a Management over REST members query http://localhost:30000/management/coherence/cluster/services/%s/partition and return the results, the http response status and any error.

type RestData

type RestData struct {
	Links []map[string]string
	Items []map[string]interface{}
}

RestData is a struct to use to hold the results of a generic Coherence management REST query.

type ServiceData

type ServiceData struct {
	Links []map[string]string `json:"Links"`
	Name  string              `json:"name"`
	Type  string              `json:"type"`
}

ServiceData is a struct to use to hold the results of a Coherence management REST service query http://localhost:30000/management/coherence/cluster/services/%s

type ServicesData

type ServicesData struct {
	Links []map[string]string `json:"Links"`
	Items []ServiceData
}

ServicesData is a struct to use to hold the results of a Coherence management REST services query http://localhost:30000/management/coherence/cluster/services

func GetServices

func GetServices(cl *http.Client, host string, port int32) (*ServicesData, int, error)

GetServices perform a Management over REST members query http://localhost:30000/management/coherence/cluster/services and return the results, the http response status and any error.

Jump to

Keyboard shortcuts

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