amp

package module
v0.0.0-...-bb670a1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2014 License: MIT Imports: 10 Imported by: 0

README

Go-AMP

This package implements the twisted.protocols.AMP protocol in Go, and supports both servers and clients.

Usage

You use this package in the same way you'd use net/rpc/jsonrpc from the stdlib.

Documentation

Index

Constants

View Source
const (
	MAX_KEY_LENGTH = 255
	MAX_VAL_LENGTH = 65535
)

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

CamelCase returns the CamelCased name. If there is an interior underscore followed by a lower case letter, drop the underscore and convert the letter to upper case.

func NewServerCodec

func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec

func RegisterErrorCode

func RegisterErrorCode(code string, msg string)

func ServeConn

func ServeConn(conn io.ReadWriteCloser)

Types

type Box

type Box map[string]string

func Decode

func Decode(buf io.Reader) (Box, error)

func Deserialize

func Deserialize(b []byte) (Box, error)

Deserialize converts a wire representation to an AMP box, if possible.

func (Box) Serialize

func (b Box) Serialize() ([]byte, error)

Serialize converts an AMP Box to the wire representation, if possible.

func (Box) Unmarshal

func (box Box) Unmarshal(x interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳