redis2kvstore

package
v8.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: MIT Imports: 17 Imported by: 0

README

Generate protocol buffer file

protoc --gofast_out=./ ./hmset.proto

Documentation

Overview

Package redis2kvstore is a generated protocol buffer package.

It is generated from these files:

hmset.proto

It has these top-level messages:

Hmset
Field

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHmset = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHmset   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Field

type Field struct {
	Name  string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
}

func (*Field) Descriptor

func (*Field) Descriptor() ([]byte, []int)

func (*Field) GetName

func (m *Field) GetName() string

func (*Field) GetValue

func (m *Field) GetValue() []byte

func (*Field) Marshal

func (m *Field) Marshal() (dAtA []byte, err error)

func (*Field) MarshalTo

func (m *Field) MarshalTo(dAtA []byte) (int, error)

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) Size

func (m *Field) Size() (n int)

func (*Field) String

func (m *Field) String() string

func (*Field) Unmarshal

func (m *Field) Unmarshal(dAtA []byte) error

type Hmset

type Hmset struct {
	Key    string   `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Fields []*Field `protobuf:"bytes,2,rep,name=Fields" json:"Fields,omitempty"`
	Sent   bool     `protobuf:"varint,3,opt,name=Sent,proto3" json:"Sent,omitempty"`
}

func (*Hmset) Descriptor

func (*Hmset) Descriptor() ([]byte, []int)

func (*Hmset) GetFields

func (m *Hmset) GetFields() []*Field

func (*Hmset) GetKey

func (m *Hmset) GetKey() string

func (*Hmset) GetSent

func (m *Hmset) GetSent() bool

func (*Hmset) Marshal

func (m *Hmset) Marshal() (dAtA []byte, err error)

func (*Hmset) MarshalTo

func (m *Hmset) MarshalTo(dAtA []byte) (int, error)

func (*Hmset) ProtoMessage

func (*Hmset) ProtoMessage()

func (*Hmset) Reset

func (m *Hmset) Reset()

func (*Hmset) Size

func (m *Hmset) Size() (n int)

func (*Hmset) String

func (m *Hmset) String() string

func (*Hmset) Unmarshal

func (m *Hmset) Unmarshal(dAtA []byte) error

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server is the thread that listen for clients' connections

func New

func New(c lib.RelayerConfig, done chan bool) (*Server, error)

New creates a new Redis local server

func (*Server) Exit

func (srv *Server) Exit()

Exit closes the listener and send done to main

func (*Server) Reload

func (srv *Server) Reload(c *lib.RelayerConfig) (err error)

Reload the configuration

func (*Server) Start

func (srv *Server) Start() (e error)

Start accepts incoming connections on the Listener

Jump to

Keyboard shortcuts

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