teamspeak3

package module
v0.0.0-...-8f90f75 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

README

go-teanspeak3

Documentation

Index

Constants

View Source
const (
	DefaultConnectTimeout = time.Second * 10
	DefaultMsgPipeLength  = 10
	MaxBufferSize         = 10 << 20
	DefaultBufferSize     = 4096
)
View Source
const (
	MinKeepAliveDuration = time.Second * 5
)

Variables

This section is empty.

Functions

func ReplaceAnsiEscapeCode

func ReplaceAnsiEscapeCode(text string) string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(t Type, host string, port int, username string, password string) (client *Client, err error)

type Protocol

type Protocol interface {
	Connect(host string, port int, username string, password string) error
	Disconnect() error
	SetInput(content string) error
	GetOutputPipe() (<-chan string, error)
}

Protocol provide an interface to implement transport protocol

func NewProtocol

func NewProtocol(t Type) (p Protocol, err error)

type Query

type Query interface {
	Init(protocol Protocol, keepAliveDuration time.Duration, keepAliveData string, keepAliveResponseLines int) error
	Request(content string) error
	GetResponsePipe() (<-chan string, error)
	Close() error
}

Query provide an interface to implement standard io with protocol io

func NewQuery

func NewQuery(t Type) (q Query, err error)

type Type

type Type int
const (
	Ssh Type = iota
)

Jump to

Keyboard shortcuts

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