stream

package
v0.0.0-...-5ed304f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(logger *log.Logger, redisClient *redis.Client) *Manager

func (*Manager) Subscribe

func (m *Manager) Subscribe(minerID uint64) (uint32, <-chan string, error)

func (*Manager) Unsubscribe

func (m *Manager) Unsubscribe(minerID uint64, subID uint32)

type Writer

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

func NewWriter

func NewWriter(
	ctx context.Context,
	chain, path string,
	logger *log.Logger,
	redisClient *redis.Client,
) (*Writer, error)

func (*Writer) WriteConnectEvent

func (w *Writer) WriteConnectEvent(
	minerID uint64,
	worker, client string,
	port int, solo bool,
)

func (*Writer) WriteDebugRequest

func (w *Writer) WriteDebugRequest(ip string, req *rpc.Request)

func (*Writer) WriteDebugResponse

func (w *Writer) WriteDebugResponse(ip string, data []byte)

func (*Writer) WriteDisconnectEvent

func (w *Writer) WriteDisconnectEvent(
	minerID uint64,
	worker, client string,
	port int,
	solo bool,
)

func (*Writer) WriteRetargetEvent

func (w *Writer) WriteRetargetEvent(
	minerID uint64,
	worker, client string,
	port int,
	solo bool,
	oldDiff, newDiff uint64,
)

func (*Writer) WriteShareEvent

func (w *Writer) WriteShareEvent(
	minerID uint64,
	worker, client string,
	port int,
	solo bool,
	status, reason string,
	shareDiff, targetDiff uint64,
)

Jump to

Keyboard shortcuts

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