Documentation
¶
Overview ¶
Package server provides the gRPC server implementation for relay group.
Index ¶
- type Service
- func (s *Service) FindAuthoritativeConfig(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.RelayGroupConfigResponse, error)
- func (s *Service) GetAuthorizedPubkeys(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.AuthorizedPubkeysResponse, error)
- func (s *Service) GetRelays(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.RelaysResponse, error)
- func (s *Service) HandleRelayGroupEvent(ctx context.Context, req *relaygroupv1.HandleEventRequest) (*commonv1.Empty, error)
- func (s *Service) IsAuthorizedPublisher(ctx context.Context, req *relaygroupv1.AuthorizedPublisherRequest) (*relaygroupv1.AuthorizedPublisherResponse, error)
- func (s *Service) Ready(ctx context.Context, _ *commonv1.Empty) (*commonv1.ReadyResponse, error)
- func (s *Service) ValidateRelayGroupEvent(ctx context.Context, req *relaygroupv1.ValidateEventRequest) (*relaygroupv1.ValidateEventResponse, error)
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 ¶
func (s *Service) GetRelays(ctx context.Context, _ *commonv1.Empty) (*relaygroupv1.RelaysResponse, error)
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 ¶
func (s *Service) IsAuthorizedPublisher(ctx context.Context, req *relaygroupv1.AuthorizedPublisherRequest) (*relaygroupv1.AuthorizedPublisherResponse, error)
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 ¶
func (s *Service) ValidateRelayGroupEvent(ctx context.Context, req *relaygroupv1.ValidateEventRequest) (*relaygroupv1.ValidateEventResponse, error)
ValidateRelayGroupEvent validates a relay group configuration event.
Source Files
¶
- service.go