Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestStep ¶
RequestStep is Request for a step, made under the guard of the run.
func Spec ¶ added in v1.30.0
func Spec() actionspec.Spec
Spec declares the grpc action. It keeps to every kind of guard: it calls only a method declared without side effects under read-only, and connects only to a host the guard allows. proto, the .proto files of the service, which it reads apart from Req, asks it to check a step against them. Its res holds, besides the fields of Res, violations and contract, for a call checked against .proto files, and messages and complete, for one whose responses stream. It cannot run without addr, service and method.
Types ¶
type Req ¶
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
}