1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.knot.health
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 KnotHealthNSID = "sh.tangled.knot.health"
15)
16
17// KnotHealth_Output is the output of a sh.tangled.knot.health call.
18type KnotHealth_Output struct {
19 // status: Health status of the knot
20 Status string `json:"status" cborgen:"status"`
21 // timestamp: Timestamp of the health check
22 Timestamp *string `json:"timestamp,omitempty" cborgen:"timestamp,omitempty"`
23 // version: Version of the knot server
24 Version *string `json:"version,omitempty" cborgen:"version,omitempty"`
25}
26
27// KnotHealth calls the XRPC method "sh.tangled.knot.health".
28func KnotHealth(ctx context.Context, c util.LexClient) (*KnotHealth_Output, error) {
29 var out KnotHealth_Output
30 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.knot.health", nil, nil, &out); err != nil {
31 return nil, err
32 }
33
34 return &out, nil
35}