···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package atproto
44+55+// schema: com.atproto.sync.defs
+37
api/atproto/syncgetHostStatus.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package atproto
44+55+// schema: com.atproto.sync.getHostStatus
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// SyncGetHostStatus_Output is the output of a com.atproto.sync.getHostStatus call.
1414+type SyncGetHostStatus_Output struct {
1515+ // accountCount: Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.
1616+ AccountCount *int64 `json:"accountCount,omitempty" cborgen:"accountCount,omitempty"`
1717+ Hostname string `json:"hostname" cborgen:"hostname"`
1818+ // seq: Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).
1919+ Seq *int64 `json:"seq,omitempty" cborgen:"seq,omitempty"`
2020+ Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
2121+}
2222+2323+// SyncGetHostStatus calls the XRPC method "com.atproto.sync.getHostStatus".
2424+//
2525+// hostname: Hostname of the host (eg, PDS or relay) being queried.
2626+func SyncGetHostStatus(ctx context.Context, c *xrpc.Client, hostname string) (*SyncGetHostStatus_Output, error) {
2727+ var out SyncGetHostStatus_Output
2828+2929+ params := map[string]interface{}{
3030+ "hostname": hostname,
3131+ }
3232+ if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil {
3333+ return nil, err
3434+ }
3535+3636+ return &out, nil
3737+}
+43
api/atproto/synclistHosts.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package atproto
44+55+// schema: com.atproto.sync.listHosts
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// SyncListHosts_Host is a "host" in the com.atproto.sync.listHosts schema.
1414+type SyncListHosts_Host struct {
1515+ AccountCount *int64 `json:"accountCount,omitempty" cborgen:"accountCount,omitempty"`
1616+ // hostname: hostname of server; not a URL (no scheme)
1717+ Hostname string `json:"hostname" cborgen:"hostname"`
1818+ // seq: Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).
1919+ Seq *int64 `json:"seq,omitempty" cborgen:"seq,omitempty"`
2020+ Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
2121+}
2222+2323+// SyncListHosts_Output is the output of a com.atproto.sync.listHosts call.
2424+type SyncListHosts_Output struct {
2525+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
2626+ // hosts: Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.
2727+ Hosts []*SyncListHosts_Host `json:"hosts" cborgen:"hosts"`
2828+}
2929+3030+// SyncListHosts calls the XRPC method "com.atproto.sync.listHosts".
3131+func SyncListHosts(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*SyncListHosts_Output, error) {
3232+ var out SyncListHosts_Output
3333+3434+ params := map[string]interface{}{
3535+ "cursor": cursor,
3636+ "limit": limit,
3737+ }
3838+ if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listHosts", params, nil, &out); err != nil {
3939+ return nil, err
4040+ }
4141+4242+ return &out, nil
4343+}