exit

package
v0.0.0-...-646495d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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.

Parameters: - sk: The private key string in hexadecimal format

Returns: - The base32 encoded public key as a string - Any error that occurred during the process

Types

type Exit

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

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

func NewExit

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

NewExit creates a new Exit node with the provided context and config. This function will currently panic if there is an error while creating the Exit node.

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