service

package
v0.5.2-slava Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShareService

type ShareService struct {
	share.Availability
	// contains filtered or unexported fields
}

TODO(@Wondertan): Simple thread safety for Start and Stop would not hurt.

func NewShareService

func NewShareService(bServ blockservice.BlockService, avail share.Availability) *ShareService

NewService creates a new basic share.Module.

func (*ShareService) GetShare

func (s *ShareService) GetShare(ctx context.Context, dah *share.Root, row, col int) (share.Share, error)

func (*ShareService) GetShares

func (s *ShareService) GetShares(ctx context.Context, root *share.Root) ([][]share.Share, error)

func (*ShareService) GetSharesByNamespace

func (s *ShareService) GetSharesByNamespace(
	ctx context.Context,
	root *share.Root,
	nID namespace.ID,
) ([]share.Share, error)

GetSharesByNamespace iterates over a square's row roots and accumulates the found shares in the given namespace.ID.

func (*ShareService) Start

func (s *ShareService) Start(context.Context) error

func (*ShareService) Stop

func (s *ShareService) Stop(context.Context) error

Jump to

Keyboard shortcuts

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