Documentation
¶
Index ¶
- func NewSharedMemoryWrapper(sm consensus.SharedMemory) atomic.SharedMemory
- type Client
- func (c *Client) Apply(requests map[ids.ID]*atomic.Requests, batches ...database.Batch) error
- func (c *Client) Get(peerChainID ids.ID, keys [][]byte) ([][]byte, error)
- func (c *Client) Indexed(peerChainID ids.ID, traits [][]byte, startTrait, startKey []byte, limit int) ([][]byte, []byte, []byte, error)
- type ConsensusClient
- func (c *ConsensusClient) Apply(requests map[ids.ID]*consensus.Requests, batches ...interface{}) error
- func (c *ConsensusClient) Get(peerChainID ids.ID, keys [][]byte) ([][]byte, error)
- func (c *ConsensusClient) Indexed(peerChainID ids.ID, traits [][]byte, startTrait, startKey []byte, limit int) ([][]byte, []byte, []byte, error)
- type Server
- func (s *Server) Apply(_ context.Context, req *sharedmemorypb.ApplyRequest) (*sharedmemorypb.ApplyResponse, error)
- func (s *Server) Get(_ context.Context, req *sharedmemorypb.GetRequest) (*sharedmemorypb.GetResponse, error)
- func (s *Server) Indexed(_ context.Context, req *sharedmemorypb.IndexedRequest) (*sharedmemorypb.IndexedResponse, error)
- type SharedMemoryWrapper
- func (w *SharedMemoryWrapper) Apply(requests map[ids.ID]*atomic.Requests, batches ...db.Batch) error
- func (w *SharedMemoryWrapper) Get(peerChainID ids.ID, keys [][]byte) (values [][]byte, err error)
- func (w *SharedMemoryWrapper) Indexed(peerChainID ids.ID, traits [][]byte, startTrait, startKey []byte, limit int) (values [][]byte, lastTrait, lastKey []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSharedMemoryWrapper ¶ added in v1.14.2
func NewSharedMemoryWrapper(sm consensus.SharedMemory) atomic.SharedMemory
NewSharedMemoryWrapper creates a new wrapper
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is atomic.SharedMemory that talks over RPC.
func NewClient ¶
func NewClient(client sharedmemorypb.SharedMemoryClient) *Client
NewClient returns shared memory connected to remote shared memory
type ConsensusClient ¶ added in v1.14.2
type ConsensusClient struct {
// contains filtered or unexported fields
}
ConsensusClient is consensus.SharedMemory that talks over RPC.
func NewConsensusClient ¶ added in v1.14.2
func NewConsensusClient(client sharedmemorypb.SharedMemoryClient) *ConsensusClient
NewConsensusClient returns shared memory connected to remote shared memory
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is shared memory that is managed over RPC.
func NewServer ¶
func NewServer(sm atomic.SharedMemory, db db.Database) *Server
NewServer returns shared memory connected to remote shared memory
func (*Server) Apply ¶
func (s *Server) Apply( _ context.Context, req *sharedmemorypb.ApplyRequest, ) (*sharedmemorypb.ApplyResponse, error)
func (*Server) Get ¶
func (s *Server) Get( _ context.Context, req *sharedmemorypb.GetRequest, ) (*sharedmemorypb.GetResponse, error)
func (*Server) Indexed ¶
func (s *Server) Indexed( _ context.Context, req *sharedmemorypb.IndexedRequest, ) (*sharedmemorypb.IndexedResponse, error)
type SharedMemoryWrapper ¶ added in v1.14.2
type SharedMemoryWrapper struct {
// contains filtered or unexported fields
}
SharedMemoryWrapper wraps consensus.SharedMemory to implement atomic.SharedMemory
func (*SharedMemoryWrapper) Apply ¶ added in v1.14.2
func (w *SharedMemoryWrapper) Apply(requests map[ids.ID]*atomic.Requests, batches ...db.Batch) error
Apply implements atomic.SharedMemory
Click to show internal directories.
Click to hide internal directories.