redis2kvstore

package
v8.7.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: MIT Imports: 19 Imported by: 0

README

Generate protocol buffer file

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

Documentation

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Field) XXX_DiscardUnknown

func (m *Field) XXX_DiscardUnknown()

func (*Field) XXX_Marshal

func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Field) XXX_Merge

func (dst *Field) XXX_Merge(src proto.Message)

func (*Field) XXX_Size

func (m *Field) XXX_Size() int

func (*Field) XXX_Unmarshal

func (m *Field) XXX_Unmarshal(b []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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Hmset) XXX_DiscardUnknown

func (m *Hmset) XXX_DiscardUnknown()

func (*Hmset) XXX_Marshal

func (m *Hmset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Hmset) XXX_Merge

func (dst *Hmset) XXX_Merge(src proto.Message)

func (*Hmset) XXX_Size

func (m *Hmset) XXX_Size() int

func (*Hmset) XXX_Unmarshal

func (m *Hmset) XXX_Unmarshal(b []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