magline

package module
v0.0.0-...-9aed184 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: MIT Imports: 1 Imported by: 2

README

magline

logo

Long connection framework

Workflow

workflow

When a client connect to magline. It must send L1 then L2 CMD on order before comunication with other business logic moudlues. And if L1 or L2 return an error, magline will return an error message to client and broker the connection.

Documentation

Overview

package magline

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Host string `json:"host" toml:"host"`
	Port uint32 `json:"port" toml:"port"`
}

Options is config option for magline

func NewOptions

func NewOptions() *Options

NewOptions return a default Options

func (*Options) Load

func (opts *Options) Load(fpath string) (err error)

Load load options from a toml or json file

type Server

type Server struct {
}

Server is a magline TCP server

func NewServer

func NewServer() (svr *Server)

NewServer create a magline's TCP server

func (*Server) Run

func (svr *Server) Run()

Directories

Path Synopsis
app
Package proto is proto define * * Author: CZ cz.theng@gmail.com
Package proto is proto define * * Author: CZ cz.theng@gmail.com

Jump to

Keyboard shortcuts

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