api

package
v0.0.0-...-04e9793 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equals

func Equals(r1 Response, r2 Response) bool

Types

type LoaderController

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

func NewLoaderController

func NewLoaderController(loaderService service.ILoaderService) *LoaderController

func (*LoaderController) LoadComponent

func (l *LoaderController) LoadComponent(payload *Request, reply *Response) error

type Request

type Request struct {
	Type    string // default core
	Version string // default 1.0.0
	Hash    []byte // expected hash
}

type Response

type Response struct {
	Type    string // same as in request
	Version string // same as in request
	Hash    []byte // new hash
	Content []byte // content is nil if 'expected hash' != 'new hash'
}

func (Response) Equal

func (r1 Response) Equal(r2 Response) bool

type RpcServer

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

func NewRpcServer

func NewRpcServer(loaderController *LoaderController) *RpcServer

func (*RpcServer) Start

func (s *RpcServer) Start(config ServerProps)

type ServerProps

type ServerProps struct {
	BindAddress string
}

Jump to

Keyboard shortcuts

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