bll

package
v0.0.0-...-6b52b4a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransparentProxy

func TransparentProxy(clientConn, serverConn net.Conn)

Types

type CfTrace

type CfTrace struct {
	Ip   string `json:"ip"`
	Loc  string `json:"loc"`
	Colo string `json:"colo"`
}

type Provider

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

func NewProvider

func NewProvider() *Provider

func (*Provider) Close

func (a *Provider) Close()

func (*Provider) GenerateInitialWSResponse

func (a *Provider) GenerateInitialWSResponse(ctx context.Context, clientConn net.Conn, req *http.Request) ([]byte, error)

Responding to WS requests

func (*Provider) GetMtlsConfig

func (a *Provider) GetMtlsConfig(config *schema.ProviderConfig) (*tls.Config, error)

func (*Provider) Handle

func (a *Provider) Handle(ctx context.Context)

func (*Provider) Listen

func (a *Provider) Listen(ctx context.Context, port int, config *schema.ProviderConfig) error

func (*Provider) ReadInitiaWSRequest

func (a *Provider) ReadInitiaWSRequest(ctx context.Context, connReader *bufio.Reader) (*schema.ClientConfig, *http.Request, context.Context, error)

ReadInitiaWSRequest Read the WS request

type Pubsub

type Pubsub struct {
	Orders map[string]*schema.NodeOrder
	// contains filtered or unexported fields
}

Pubsub

func NewPubsub

func NewPubsub() *Pubsub

func (*Pubsub) GetCftrace

func (a *Pubsub) GetCftrace() (*CfTrace, error)

func (*Pubsub) InitByDB

func (a *Pubsub) InitByDB(ctx context.Context, ps *p2p.PubSub)

检查数据库是否存在

func (*Pubsub) NewServerInfo

func (a *Pubsub) NewServerInfo() *schema.NodeInfo

func (*Pubsub) ParseW3sData

func (a *Pubsub) ParseW3sData(ctx context.Context, order *schema.NodeOrder) (*schema.ProviderConfig, error)

func (*Pubsub) ReceiveHandle

func (a *Pubsub) ReceiveHandle(ctx context.Context, ps *p2p.PubSub, msg string) error

func (*Pubsub) StartPubsubHandler

func (a *Pubsub) StartPubsubHandler(ctx context.Context, ps *p2p.PubSub, p *p2p.P2P)

eventhandle

Jump to

Keyboard shortcuts

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