common

package
v0.55.10 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Unlicense Imports: 9 Imported by: 0

Documentation

Overview

Package common provides shared utilities for sync services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NIP11Cache

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

NIP11Cache caches relay information documents with TTL

func NewNIP11Cache

func NewNIP11Cache(ttl time.Duration) *NIP11Cache

NewNIP11Cache creates a new NIP-11 cache with the specified TTL

func (*NIP11Cache) Get

func (c *NIP11Cache) Get(ctx context.Context, relayURL string) (*relayinfo.T, error)

Get fetches relay information for a given URL, using cache if available

func (*NIP11Cache) GetPubkey

func (c *NIP11Cache) GetPubkey(ctx context.Context, relayURL string) (string, error)

GetPubkey fetches the relay's identity pubkey from its NIP-11 document

Source Files

  • nip11.go

Jump to

Keyboard shortcuts

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