session

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHandler

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

ClientHandler implements ClientSession.

func NewClientSession added in v0.1.1

func NewClientSession(conn net.Conn, minterFn ContextMinterFunc) *ClientHandler

func (*ClientHandler) GetWoW

func (c *ClientHandler) GetWoW(ctx context.Context) (string, error)

type ClientSession

type ClientSession interface {
	GetWoW(ctx context.Context) (string, error)
}

type ContextMinterFunc added in v0.1.1

type ContextMinterFunc func(ctx context.Context, complexity uint8, prefix []byte) ([]byte, error)

type ServerHandler

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

ServerHandler implements ServerSession.

func NewServerSession

func NewServerSession(conn net.Conn, services *ServerServices) *ServerHandler

func (*ServerHandler) Handle

func (s *ServerHandler) Handle()

func (*ServerHandler) Stop

func (s *ServerHandler) Stop()

type ServerServices added in v0.1.1

type ServerServices struct {
	Logger    logger.Logger
	PoW       pow.PoW
	WoW       wow.WoW
	Sampler   stat.CPUSampler
	Complexer complexer.Complexer
	Manager   manager.Manager
	Limiter   limiter.StringLimiter
}

type ServerSession

type ServerSession interface {
	Handle()
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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