gtun

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func NewIfce

func NewIfce(tap bool) (*water.Interface, error)

func PostJson

func PostJson(uri string, jsonbody interface{}, header map[string]string) (data string, err error)

Types

type CMD

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

type Client

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

func NewClient

func NewClient(cfg *ClientConfig, registry *Registry) *Client

func (*Client) Run

func (client *Client) Run()

type ClientConfig

type ClientConfig struct {
	ServerAddr string `toml:"server"`
	AuthKey    string `toml:"auth"`
	// contains filtered or unexported fields
}

type Config

type Config struct {
	ClientConfig   *ClientConfig   `toml:"client"`
	RegistryConfig *RegistryConfig `toml:"registry"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

type Registry

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

func NewRegistry

func NewRegistry(cfg *RegistryConfig) *Registry

func (*Registry) Access

func (r *Registry) Access() (string, error)

type RegistryConfig

type RegistryConfig struct {
	Addr  string `json:"addr"`
	Token string `json:"token"`
	Must  bool   `json:"must"`
}

Jump to

Keyboard shortcuts

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