server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 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() (int, error)

Types

type Enclave

type Enclave interface {
	Store(message *[]byte, sender []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) Push

func (*Server) Receive

func (*Server) Send

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, 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