Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// SetCallback changes the callback function for the response message.
SetCallback(cb func([]ProxyMessage))
// Run the client in blocking mode.
Run(ctx context.Context)
// Probe triggers a query request immediately.
Probe(ctx context.Context)
}
Client is used to query proxy state from the frp client. It may be a pipe client or HTTP client.
type PipeClient ¶
type PipeClient struct {
// contains filtered or unexported fields
}
func NewPipeClient ¶
func NewPipeClient(name string, payload func() []string) *PipeClient
func (*PipeClient) Probe ¶
func (p *PipeClient) Probe(ctx context.Context)
func (*PipeClient) Run ¶
func (p *PipeClient) Run(ctx context.Context)
func (*PipeClient) SetCallback ¶
func (p *PipeClient) SetCallback(cb func([]ProxyMessage))
type ProxyMessage ¶
ProxyMessage is the status information of a proxy.
Click to show internal directories.
Click to hide internal directories.