Documentation
¶
Overview ¶
Package grpc provides a gRPC client for the relay group service.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) FindAuthoritativeConfig(ctx context.Context) (*relaygroupv1.RelayGroupConfigResponse, error)
- func (c *Client) GetAuthorizedPubkeys(ctx context.Context) ([][]byte, error)
- func (c *Client) GetRelays(ctx context.Context) ([]string, error)
- func (c *Client) HandleRelayGroupEvent(ctx context.Context, event *commonv1.Event) error
- func (c *Client) IsAuthorizedPublisher(ctx context.Context, pubkey []byte) (bool, error)
- func (c *Client) Ready() <-chan struct{}
- func (c *Client) ValidateRelayGroupEvent(ctx context.Context, event *commonv1.Event) (bool, string, error)
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a gRPC client for the relay group service.
func New ¶
func New(ctx context.Context, cfg *ClientConfig) (*Client, error)
New creates a new gRPC relay group client.
func (*Client) FindAuthoritativeConfig ¶
func (c *Client) FindAuthoritativeConfig(ctx context.Context) (*relaygroupv1.RelayGroupConfigResponse, error)
FindAuthoritativeConfig finds the authoritative relay group configuration.
func (*Client) GetAuthorizedPubkeys ¶
GetAuthorizedPubkeys returns all authorized publisher pubkeys.
func (*Client) HandleRelayGroupEvent ¶
HandleRelayGroupEvent processes a relay group event and triggers peer updates.
func (*Client) IsAuthorizedPublisher ¶
IsAuthorizedPublisher checks if a pubkey can publish relay group configs.
type ClientConfig ¶
ClientConfig holds configuration for the gRPC client.
Click to show internal directories.
Click to hide internal directories.