bcs

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SchemeHTTP is http scheme.
	SchemeHTTP = "http"

	// SchemeHTTPS is https scheme.
	SchemeHTTPS = "https"
)

Variables

This section is empty.

Functions

func GetClusterID

func GetClusterID(zkHosts string, hostIP string, bcsTLSConfig options.TLS) (string, error)

Types

type ClusterKeeperResponse

type ClusterKeeperResponse struct {
	Code    uint                   `json:"code"`
	Result  bool                   `json:"result"`
	Message string                 `json:"message"`
	Data    map[string]interface{} `json:"data"`
}

type HTTPClientConfig

type HTTPClientConfig struct {
	// URL is http whole url.
	URL string

	// Scheme is http url scheme, http/https.
	Scheme string

	// CAFile is https root certificate authority file path.
	CAFile string

	// CertFile is https certificate file path.
	CertFile string

	// KeyFile is https key file path.
	KeyFile string

	// Password is certificate authority file password.
	Password string
}

HTTPClientConfig is bcs inner service http client config struct.

type InnerService

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

InnerService is bcs inner service for discovery.

func GetNetService

func GetNetService(zkHosts string, bcsTLSConfig options.TLS, customEndpoints []string, isExternal bool) (*InnerService, *RegisterDiscover.RegDiscover, error)

GetNetService returns netservice InnerService object for discovery.

func GetStorageService

func GetStorageService(zkHosts string, bcsTLSConfig options.TLS, customEndpoints []string, isExternal bool) (*InnerService, *RegisterDiscover.RegDiscover, error)

GetStorageService returns storage InnerService object for discovery.

func NewInnerService

func NewInnerService(serviceName string, eventChan <-chan *RegisterDiscover.DiscoverEvent,
	customEndpoints []string, isExternal bool) *InnerService

NewInnerService creates a new serviceName InnerService instance for discovery.

func (*InnerService) Servers

func (s *InnerService) Servers() []*HTTPClientConfig

Servers returns current available services instances.

func (*InnerService) Watch

func (s *InnerService) Watch(bcsTLSConfig options.TLS) error

Watch keeps watching service instance endpoints from ZK.

Jump to

Keyboard shortcuts

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