server

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 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(networkInterface string) (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) Delete added in v1.0.2

func (*Server) Push

func (*Server) Receive

func (*Server) Resend added in v1.0.2

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