hbstream

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeartbeatStreams

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

HeartbeatStreams is the bridge of communication with your storage application instance.

func NewHeartbeatStreams

func NewHeartbeatStreams(ctx context.Context, clusterID uint64, containerInformer core.ContainerSetInformer) *HeartbeatStreams

NewHeartbeatStreams creates a new HeartbeatStreams which enable background running by default.

func NewTestHeartbeatStreams

func NewTestHeartbeatStreams(ctx context.Context, clusterID uint64, containerInformer core.ContainerSetInformer, needRun bool) *HeartbeatStreams

NewTestHeartbeatStreams creates a new HeartbeatStreams for test purpose only. Please use NewHeartbeatStreams for other usage.

func (*HeartbeatStreams) BindStream

func (s *HeartbeatStreams) BindStream(containerID uint64, stream opt.HeartbeatStream)

BindStream binds a stream with a specified container.

func (*HeartbeatStreams) Close

func (s *HeartbeatStreams) Close()

Close closes background running.

func (*HeartbeatStreams) Drain

func (s *HeartbeatStreams) Drain(count int) error

Drain consumes message from msgCh when disable background running. For test only.

func (*HeartbeatStreams) MsgLength

func (s *HeartbeatStreams) MsgLength() int

MsgLength gets the length of msgCh. For test only.

func (*HeartbeatStreams) SendMsg

SendMsg sends a message to related container.

Jump to

Keyboard shortcuts

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