A fork of https://github.com/teal-fm/piper
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package atproto
4
5// schema: com.atproto.sync.getHostStatus
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/xrpc"
11)
12
13// SyncGetHostStatus_Output is the output of a com.atproto.sync.getHostStatus call.
14type SyncGetHostStatus_Output struct {
15 // accountCount: Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.
16 AccountCount *int64 `json:"accountCount,omitempty" cborgen:"accountCount,omitempty"`
17 Hostname string `json:"hostname" cborgen:"hostname"`
18 // seq: Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).
19 Seq *int64 `json:"seq,omitempty" cborgen:"seq,omitempty"`
20 Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
21}
22
23// SyncGetHostStatus calls the XRPC method "com.atproto.sync.getHostStatus".
24//
25// hostname: Hostname of the host (eg, PDS or relay) being queried.
26func SyncGetHostStatus(ctx context.Context, c *xrpc.Client, hostname string) (*SyncGetHostStatus_Output, error) {
27 var out SyncGetHostStatus_Output
28
29 params := map[string]interface{}{
30 "hostname": hostname,
31 }
32 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil {
33 return nil, err
34 }
35
36 return &out, nil
37}