service

package
v0.0.0-...-ee3d063 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExist = errors.New("service/cap exist")
View Source
var ErrNotExist = errors.New("service/cap not exist")
View Source
var ErrNotService = errors.New("not a service")
View Source
var ErrOccupied = errors.New("occupied")
View Source
var ErrUnknownProcess = errors.New("unknown process")
View Source
var ErrWrongCaller = errors.New("wrong caller")

Functions

func NewServiceTree

func NewServiceTree(abs tree.Path, callFn func(host node.HostID, process uint32, provider uint32, data []byte, ctx context.Context) ([]byte, error), local bool) *serviceTree

Types

type CallerInfo

type CallerInfo struct {
	Host    node.HostID
	Process uint32
}

type Manager

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

func NewManager

func NewManager(host node.HostID) *Manager

func (*Manager) CallService

func (man *Manager) CallService(entry string, cap uuid.UUID, data []byte, caller process.Process) ([]byte, error)

func (*Manager) Init

func (man *Manager) Init(procMan *process.Manager, callRemote callRemote, callBroadcast callBroadcast, remoteCaller remoteCaller, lockFn lockFn, unlockFn lockFn) error

func (*Manager) LockAction

func (man *Manager) LockAction(path string, host uuid.UUID, action bool) bool

func (*Manager) Sync

func (man *Manager) Sync(info *tree.Transfer) (*tree.Transfer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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