Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶ added in v1.2.1
type Connection struct {
Connection *opts.ConnectionOptions
}
Connection is a convenience struct wrapping opts.ConnectionOptions so we can marshal Config to JSON. The Marshaler methods are implemented to return a string of protobuf bytes because protobuf oneof's cannot be unmarshalled correctly by json.Unmarshal()
func (*Connection) MarshalJSON ¶ added in v1.2.1
func (c *Connection) MarshalJSON() ([]byte, error)
func (*Connection) UnmarshalJSON ¶ added in v1.2.1
func (c *Connection) UnmarshalJSON(v []byte) error
UnmarshalJSON unmarshals JSON into a connection struct
type Relay ¶
type Relay struct { Active bool `json:"-"` Id string `json:"-"` CancelCtx context.Context `json:"-"` CancelFunc context.CancelFunc `json:"-"` RelayCh chan interface{} `json:"-"` Backend backends.Backend `json:"-"` Options *opts.RelayOptions `json:"config"` // contains filtered or unexported fields }
func (*Relay) MarshalJSON ¶ added in v1.2.1
MarshalJSON marshals a tunnel to JSON
func (*Relay) StartRelay ¶
StartRelay starts a configured relay, it's workers, and the GRPC workers; StartRelay will block for "delay" duration, waiting for errors.
func (*Relay) UnmarshalJSON ¶ added in v1.2.1
UnmarshalJSON unmarshals JSON into a tunnel struct
type Tunnel ¶ added in v1.4.0
type Tunnel struct { Active bool `json:"-"` Id string `json:"-"` CancelCtx context.Context `json:"-"` CancelFunc context.CancelFunc `json:"-"` Backend backends.Backend `json:"-"` Options *opts.TunnelOptions `json:"config"` TunnelService tunnel.ITunnel PlumberClusterID string `json:"-"` // contains filtered or unexported fields }
func (*Tunnel) MarshalJSON ¶ added in v1.4.0
MarshalJSON marshals a tunnel to JSON
func (*Tunnel) StartTunnel ¶ added in v1.4.0
StartTunnel will attempt to start the replay tunnel. Upon the start, it will wait for the given "delay" listening for errors. It will return an error if it encounters any errors on the ErrorChan or if the Tunnel call fails.
Subsequent failures inside of Tunnel() are not handled yet.
func (*Tunnel) UnmarshalJSON ¶ added in v1.4.0
UnmarshalJSON unmarshals JSON into a tunnel struct