gsd

package module
v0.0.0-...-1bbae65 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2015 License: BSD-3-Clause Imports: 14 Imported by: 2

README

GSD: Golang Service Discovery

WIP

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProxyRetryTime = 5 * time.Second
)

Functions

This section is empty.

Types

type Banner struct {
	Ip      string
	Port    string
	Service string
	Content string
	Error   string
}

type Gsd

type Gsd struct {
	Ips      []string
	Ports    []string
	Services []Service
}

func NewGsd

func NewGsd(ips []string, ports []string) *Gsd

func (*Gsd) AddServices

func (g *Gsd) AddServices(services []Service)

func (*Gsd) Run

func (g *Gsd) Run(maxConn int) chan Banner

func (*Gsd) SetProxy

func (g *Gsd) SetProxy(host string, auth *proxy.Auth)

type GsdDialer

type GsdDialer struct {
	*net.Dialer
}

func (*GsdDialer) Dial

func (d *GsdDialer) Dial(network, address string) (net.Conn, error)

type HttpService

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

func NewHttpService

func NewHttpService() *HttpService

func (*HttpService) GetBanner

func (s *HttpService) GetBanner(ip string, port string) Banner

func (*HttpService) Name

func (s *HttpService) Name() string

func (*HttpService) SetHeader

func (s *HttpService) SetHeader(key, value string)

type HttpsService

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

func NewHttpsService

func NewHttpsService() *HttpsService

func (*HttpsService) GetBanner

func (s *HttpsService) GetBanner(ip string, port string) Banner

func (*HttpsService) Name

func (s *HttpsService) Name() string

func (*HttpsService) SetHeader

func (s *HttpsService) SetHeader(key string, value string)

type Service

type Service interface {
	Name() string
	GetBanner(ip string, port string) Banner
}

type TCPService

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

func NewTCPService

func NewTCPService() *TCPService

func (*TCPService) GetBanner

func (s *TCPService) GetBanner(ip string, port string) Banner

func (*TCPService) Name

func (s *TCPService) Name() string

type TCPTLSService

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

func NewTCPTLSService

func NewTCPTLSService() *TCPTLSService

func (*TCPTLSService) GetBanner

func (s *TCPTLSService) GetBanner(ip string, port string) Banner

func (*TCPTLSService) Name

func (s *TCPTLSService) Name() string

Jump to

Keyboard shortcuts

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