Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseImplementation ¶
type BaseImplementation interface { // Ping is used to ping the server. Ping() error // Get is used to get a record. Get(key []byte) ([]byte, error) }
BaseImplementation is implementation functionality used by both HTTP and HNP.
type ClientError ¶
type ClientError struct {
// contains filtered or unexported fields
}
ClientError is the base error for client errors. All other returned errors wrap this.
func (ClientError) Error ¶
func (e ClientError) Error() string
type DatabaseNotFound ¶
type DatabaseNotFound struct {
// contains filtered or unexported fields
}
DatabaseNotFound is thrown when the database specified is not found.
type HNPImplementation ¶
type HNPImplementation interface { BaseImplementation // AddEventHandler is used to add a handler for custom events. // Note that the bytes should not be mutated. AddEventHandler(ch chan []byte) // MutexLock is used to lock a global mutex. MutexLock() error // MutexUnlock is used to unlock a globally locked mutex. MutexUnlock() error // SendEvent is used to send an event to the HyperCache server. SendEvent(b []byte) error }
HNPImplementation includes HNP exclusive functionality.
func NewConnectionWithHNPAddr ¶
func NewConnectionWithHNPAddr(addr, password string, db uint16) (HNPImplementation, error)
NewConnectionWithHNPAddr is used to connect with a HNP address.
func NewConnectionWithHNPSocket ¶
NewConnectionWithHNPSocket is used to connect with a newly made HNP socket.
type InvalidCredentials ¶
type InvalidCredentials struct {
// contains filtered or unexported fields
}
InvalidCredentials is returned when the users credentials are invalid.
type InvalidPacket ¶
type InvalidPacket struct {
// contains filtered or unexported fields
}
InvalidPacket is returned by the server when it deems a packet as invalid.
Click to show internal directories.
Click to hide internal directories.