daemon

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolHTTPS = "https"
	ProtocolTCP   = "tcp"
	ProtocolTLS   = "tls"
)

Variables

View Source
var (
	ConnectionStatusStatusOnline  = ConnectionStatus("online")
	ConnectionStatusStatusOffline = ConnectionStatus("offline")
	ConnectionStatusReconnecting  = ConnectionStatus("reconnecting")
)

Functions

func Start

func Start()

Types

type Configuration added in v0.4.0

type Configuration struct {
	Name     string   `json:"name"`
	Protocol Protocol `json:"protocol"`
	Prefix   string   `json:"prefix"`
	Hostname string   `json:"hostname"`
	Domain   string   `json:"domain"`
	Port     int      `json:"port"`
}

type ConnectReply added in v0.4.0

type ConnectReply struct {
}

type ConnectRequest added in v0.4.0

type ConnectRequest struct {
	Configuration string
	Address       string
	Protocol      Protocol
}

type Connection added in v0.4.0

type Connection struct {
	ID                string `json:"id"`
	User              string
	Host              string
	TargetAddress     string `json:"target_address"`
	RemoteHost        string
	RemotePort        int
	RemoteURI         string           `json:"remote_uri"`
	Status            ConnectionStatus `json:"status"`
	CreatedAt         time.Time        `json:"created_at"`
	UpdatedAt         time.Time        `json:"updated_at"`
	ConfigurationName string           `json:"configuration_name"`
	Configuration     *Configuration   `json:"-"`
	// contains filtered or unexported fields
}

type ConnectionStatus added in v0.4.0

type ConnectionStatus string

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type PSReply

type PSReply struct {
	Connections []*Connection
}

type PSRequest

type PSRequest struct {
}

type Protocol

type Protocol string

type RMReply

type RMReply struct {
}

type RMRequest

type RMRequest struct {
	ID    string
	Force bool
}

type Server added in v0.4.0

type Server struct {
	Connections map[string]*Connection
	// contains filtered or unexported fields
}

func (*Server) Connect added in v0.4.0

func (s *Server) Connect(req *ConnectRequest, rep *ConnectReply) (err error)

func (*Server) PS added in v0.4.0

func (s *Server) PS(req *PSRequest, rep *PSReply) error

func (*Server) RM added in v0.4.0

func (s *Server) RM(req *RMRequest, rep *RMReply) error

func (*Server) Start added in v0.4.0

func (s *Server) Start(req *StartRequest, rep *StartReply) (err error)

func (*Server) Stop added in v0.4.0

func (s *Server) Stop(req *StopRequest, rep *StopReply) error

func (*Server) StopDaemon added in v0.4.0

func (s *Server) StopDaemon(req *StopDaemonRequest, rep *StopDaemonReply) (err error)

type StartReply

type StartReply struct {
}

type StartRequest

type StartRequest struct {
	ID string
}

type StopDaemonReply added in v0.4.0

type StopDaemonReply struct {
}

type StopDaemonRequest added in v0.4.0

type StopDaemonRequest struct {
}

type StopReply

type StopReply struct {
}

type StopRequest

type StopRequest struct {
	ID string
}

Jump to

Keyboard shortcuts

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