gomasio

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: MIT Imports: 7 Imported by: 0

README

gomasio

Test

gomasio is socket.io-client implementation by go.

Installation

go get github.com/orisano/gomasio

Author

Nao Yonashiro (@orisano)

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURL

func GetURL(host string, opts ...URLOption) (*url.URL, error)

func WithSecure

func WithSecure(o *URLOptions)

Types

type Conn

type Conn interface {
	WriterFactory
	NextReader() (io.Reader, error)
	Close() error
}

func NewConn

func NewConn(urlStr string, opts ...ConnOption) (Conn, error)

type ConnOption

type ConnOption func(o *ConnOptions)

func WithCookieJar

func WithCookieJar(jar http.CookieJar) ConnOption

func WithHeader

func WithHeader(h http.Header) ConnOption

func WithQueueSize

func WithQueueSize(qsize uint) ConnOption

type ConnOptions

type ConnOptions struct {
	QueueSize uint
	Header    http.Header
	Dialer    *websocket.Dialer
}

type URLOption

type URLOption func(o *URLOptions)

func DelQuery

func DelQuery(key string) URLOption

func SetQuery

func SetQuery(key, value string) URLOption

func WithPath

func WithPath(p string) URLOption

type URLOptions

type URLOptions struct {
	Scheme string
	Path   string
	Query  url.Values
	Logger *log.Logger
}

type WriteFlusher

type WriteFlusher interface {
	io.Writer
	Flush() error
}

func NewPrefixWriter

func NewPrefixWriter(wf WriteFlusher, prefix []byte) WriteFlusher

func NopFlusher

func NopFlusher(w io.Writer) WriteFlusher

type WriterFactory

type WriterFactory interface {
	NewWriter() WriteFlusher
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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