exit

package
v0.0.0-...-ba1e856 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPublicKeyBase32

func GetPublicKeyBase32(sk string) (string, error)

GetPublicKeyBase32 decodes the private key string from hexadecimal format and returns the base32 encoded public key obtained using the provided private key. The base32 encoding has no padding. If there is an error decoding the private key or generating the public key, an error is returned.

Types

type Exit

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

Exit represents a structure that holds information related to an exit node.

func New

func New(ctx context.Context, exitNodeConfig *config.ExitConfig) *Exit

func (*Exit) DeleteEvent

func (e *Exit) DeleteEvent(ctx context.Context, event *nostr.Event) error

func (*Exit) ListenAndServe

func (e *Exit) ListenAndServe(ctx context.Context)

ListenAndServe handles incoming events from the subscription channel. It processes each event by calling the processMessage method, as long as the event is not nil. If the context is canceled (ctx.Done() receives a value), the method returns.

func (*Exit) StartReverseProxy

func (e *Exit) StartReverseProxy(ctx context.Context, httpTarget string, port int32) error

type MutexMap

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

func NewMutexMap

func NewMutexMap() *MutexMap

func (*MutexMap) Lock

func (mm *MutexMap) Lock(id string)

func (*MutexMap) Unlock

func (mm *MutexMap) Unlock(id string)

Jump to

Keyboard shortcuts

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