internal

package
v0.0.0-...-83af506 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROJECT_NAME = "dcache"
	VERSION      = "0.1"
)
View Source
const (
	//保留 = byte(0)
	OP_REQ_GET = byte(1)
	OP_REQ_PUT = byte(2)
	OP_REQ_DEL = byte(3)

	//http response code
	//保留 = byte(0)
	OP_RESP_200 = byte(1)
	OP_RESP_404 = byte(2)
	OP_RESP_302 = byte(3)
	OP_RESP_402 = byte(4) //保留,将来使用
)

1** 信息,服务器收到请求,需要请求者继续执行操作 2** 成功,操作被成功接收并处理 3** 重定向,需要进一步的操作以完成请求 4** 客户端错误,请求包含语法错误或无法完成请求 5** 服务器错误,服务器在处理请求的过程中发生了错误

https://www.runoob.com/http/http-status-codes.html

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Op     byte
	Retain byte
	Key    []byte
	Value  []byte
}

func (*Data) IsValue

func (d *Data) IsValue() bool

type Port

type Port int32
const (
	TCP_PORT  Port = 7777 //tcp
	QUIC_PORT Port = 7777 //udp
	GRPC_PORT Port = 7778
)

func (Port) GetAddr

func (p Port) GetAddr(listen string) string

type Services

type Services struct {
	TCP     bool
	GRPC    bool
	QUIC    bool
	ALL     bool
	TCPMux  bool
	Listen  string
	MaxConn int
}

Jump to

Keyboard shortcuts

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