Documentation ¶
Index ¶
- Variables
- func DefaultPulsarCluster() (test.Cluster, error)
- func InitCluster(conf *InitConf, image, network string) *test.BaseContainer
- func NewPulsarCluster(spec *ClusterSpec) (test.Cluster, error)
- func NewStandalone(image string) *test.BaseContainer
- type Cluster
- type ClusterDef
- func (c *ClusterDef) Close(ctx context.Context)
- func (c *ClusterDef) GetHTTPServiceURL(ctx context.Context) (string, error)
- func (c *ClusterDef) GetPlainTextServiceURL(ctx context.Context) (string, error)
- func (c *ClusterDef) Start(ctx context.Context) error
- func (c *ClusterDef) Stop(ctx context.Context) error
- type ClusterSpec
- type InitConf
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InvalidPort = -1 DefaultZKPort = 2181 DefaultBookiePort = 3181 DefaultBrokerPort = 6650 DefaultBrokerHTTPPort = 8080 LatestImage = "apachepulsar/pulsar:latest" )
Functions ¶
func DefaultPulsarCluster ¶
DefaultPulsarCluster creates a pulsar cluster using the default cluster spec.
func InitCluster ¶
func InitCluster(conf *InitConf, image, network string) *test.BaseContainer
InitCluster returns a container for executing init pulsar cluster.
func NewPulsarCluster ¶
func NewPulsarCluster(spec *ClusterSpec) (test.Cluster, error)
NewPulsarCluster creates a pulsar cluster using the spec.
func NewStandalone ¶
func NewStandalone(image string) *test.BaseContainer
Types ¶
type Cluster ¶
type Cluster interface { // Start a pulsar cluster. Start(ctx context.Context) error // Stop a pulsar cluster. Stop(ctx context.Context) error // GetPlainTextServiceURL gets the pulsar service connect string. GetPlainTextServiceURL(ctx context.Context) (string, error) // GetHTTPServiceURL gets the pulsar HTTP service connect string. GetHTTPServiceURL(ctx context.Context) (string, error) // Close closes resources used for starting the cluster. Close(ctx context.Context) }
type ClusterDef ¶
type ClusterDef struct {
// contains filtered or unexported fields
}
func (*ClusterDef) Close ¶
func (c *ClusterDef) Close(ctx context.Context)
func (*ClusterDef) GetHTTPServiceURL ¶
func (c *ClusterDef) GetHTTPServiceURL(ctx context.Context) (string, error)
func (*ClusterDef) GetPlainTextServiceURL ¶
func (c *ClusterDef) GetPlainTextServiceURL(ctx context.Context) (string, error)
type ClusterSpec ¶
type ClusterSpec struct { Image string ClusterName string BookiePort int NumBookies int BrokerServicePort int BrokerHTTPServicePort int NumBrokers int ProxyServicePort int ProxyHTTPServicePort int NumProxies int }
ClusterSpec is to build a pulsar cluster.
func DefaultClusterSpec ¶
func DefaultClusterSpec() *ClusterSpec
DefaultClusterSpec returns default configuration of a cluster.
Click to show internal directories.
Click to hide internal directories.