server

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: 5 Imported by: 0

Documentation

Overview

Package server provides the gRPC server implementation for relay group.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	relaygroupv1.UnimplementedRelayGroupServiceServer
	// contains filtered or unexported fields
}

Service implements the RelayGroupServiceServer interface.

func NewService

func NewService(db database.Database, mgr *relaygroup.Manager) *Service

NewService creates a new relay group gRPC service.

func (*Service) FindAuthoritativeConfig

func (s *Service) FindAuthoritativeConfig(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.RelayGroupConfigResponse, error)

FindAuthoritativeConfig finds the authoritative relay group configuration.

func (*Service) GetAuthorizedPubkeys

func (s *Service) GetAuthorizedPubkeys(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.AuthorizedPubkeysResponse, error)

GetAuthorizedPubkeys returns all authorized publisher pubkeys.

func (*Service) GetRelays

GetRelays returns the list of relays from the authoritative config.

func (*Service) HandleRelayGroupEvent

func (s *Service) HandleRelayGroupEvent(ctx context.Context, req *relaygroupv1.HandleEventRequest) (*commonv1.Empty, error)

HandleRelayGroupEvent processes a relay group event and triggers peer updates.

func (*Service) IsAuthorizedPublisher

IsAuthorizedPublisher checks if a pubkey can publish relay group configs.

func (*Service) Ready

Ready returns whether the service is ready to serve requests.

func (*Service) ValidateRelayGroupEvent

ValidateRelayGroupEvent validates a relay group configuration event.

Source Files

  • service.go

Jump to

Keyboard shortcuts

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