server

package
v0.0.0-...-76cb802 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package server contains the core server components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCertFiles

func CheckCertFiles(certFile, keyFile string) error

func GetFreePort

func GetFreePort(networkInterface string) (int, error)

Types

type Enclave

type Enclave interface {
	Store(message *[]byte, sender []byte, recipients [][]byte) ([]byte, error)
	SendSignedTx(message *[]byte, recipients [][]byte) ([]byte, error)
	StorePayloadGrpc(epl api.EncryptedPayload, encoded []byte) ([]byte, error)
	StorePayload(encoded []byte) ([]byte, error)
	Retrieve(digestHash *[]byte, to *[]byte) ([]byte, error)
	RetrieveDefault(digestHash *[]byte) ([]byte, error)
	RetrieveFor(digestHash *[]byte, reqRecipient *[]byte) (*[]byte, error)
	RetrieveAllFor(reqRecipient *[]byte) error
	Delete(digestHash *[]byte) error
	UpdatePartyInfo(encoded []byte)
	UpdatePartyInfoGrpc(url string, recipients map[[nacl.KeySize]byte]string, parties map[string]bool)
	GetEncodedPartyInfo() []byte
	GetEncodedPartyInfoGrpc() []byte
	GetPartyInfo() (url string, recipients map[[nacl.KeySize]byte]string, parties map[string]bool)
}

Enclave is the interface used by the transaction enclaves.

type Server

type Server struct {
	Enclave Enclave
}

func (*Server) Delete

func (*Server) Push

func (*Server) Receive

func (*Server) Resend

func (*Server) Send

func (*Server) SendSignedTx

func (s *Server) SendSignedTx(ctx context.Context, in *chimera.SendSignedRequest) (*chimera.SendResponse, error)

func (*Server) StoreRaw

func (s *Server) StoreRaw(ctx context.Context, in *chimera.StoreRequest) (*chimera.SendResponse, error)

func (*Server) Upcheck

func (*Server) UpdatePartyInfo

func (s *Server) UpdatePartyInfo(ctx context.Context, in *chimera.PartyInfo) (*chimera.PartyInfoResponse, error)

func (*Server) Version

func (s *Server) Version(ctx context.Context, in *chimera.ApiVersion) (*chimera.ApiVersion, error)

type TransactionManager

type TransactionManager struct {
	Enclave Enclave
}

TransactionManager is responsible for handling all transaction requests.

func Init

func Init(enc Enclave, networkInterface string, port int, ipcPath string, grpc bool, grpcJsonPort int, tls bool, certFile, keyFile string) (TransactionManager, error)

Init initializes a new TransactionManager instance.

Jump to

Keyboard shortcuts

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