Documentation
¶
Index ¶
- func Keeps() []string
- func NewCoverage(path string, r *report.Report) (*oas.Coverage, error)
- func Params() []string
- func Request(data map[string]any, opts ...Option) (map[string]any, error)
- func RequestStep(call actionrpc.Call, opts ...Option) (map[string]any, error)
- func Serve()
- type Action
- type Callback
- type Option
- type Req
- type Res
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keeps ¶ added in v1.21.0
func Keeps() []string
Keeps returns the kinds of guard the grpc action keeps to: it calls only a method declared without side effects under read-only, and connects only to a host the guard allows.
func NewCoverage ¶ added in v1.20.0
NewCoverage counts the steps of r that called each method the .proto file at path declares, as proto.files names the file. The file is parsed on its own, without its imports, as its services and methods are all that is counted. A .proto file declares no statuses its methods end with, so that its coverage is told by methods alone.
func Params ¶ added in v1.20.0
func Params() []string
Params returns the keys the grpc action takes in with: those of Req, and proto, which it reads apart from Req.
func RequestStep ¶ added in v1.21.0
RequestStep is Request for a step, made under the guard of the run.
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
type Req ¶ added in v1.18.0
type Req struct {
// Protocol is how the call is made: grpc, the default, or connect, the
// Connect protocol over HTTP, which reaches a server through an HTTP/1.1
// proxy too.
Protocol string `map:"protocol"`
Addr string `map:"addr" validate:"required"`
Service string `map:"service" validate:"required"`
Method string `map:"method" validate:"required"`
Body string `map:"body"`
Timeout string `map:"timeout"`
TLS bool `map:"tls"`
Insecure bool `map:"insecure"`
CertFile string `map:"cert_file"`
KeyFile string `map:"key_file"`
CAFile string `map:"ca_file"`
Metadata map[string]string `map:"metadata"`
// Codec is how a Connect call encodes its messages: json, the default,
// or proto. A gRPC call takes none.
Codec string `map:"codec"`
// MaxMessages, when it is above 0, is how many responses of a stream
// are read before the call is left.
MaxMessages int `map:"max_messages"`
// contains filtered or unexported fields
}