Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
GuestLimits = &hznpb.Account_Limits{
HttpRequests: 5,
Bandwidth: 1024 / 60.0,
}
)
Functions ¶
func Run ¶
Run initializes and starts the server. This will block until the server exits (by cancelling the associated context set with WithContext or due to an unrecoverable error).
func TestGuestAccount ¶
func TestGuestAccount(t testing.T, client pb.WaypointHznClient) grpc.CallOption
TestGuestAccount registers a guest account and returns a context that can be used with auth information for future API calls.
Types ¶
type Option ¶
type Option func(*options)
Option configures Run
func WithContext ¶
WithContext sets the context for the server. When this context is cancelled, the server will be shut down.
func WithGRPC ¶
WithGRPC sets the GRPC listener. This listener must be closed manually by the caller. Prior to closing the listener, it is recommended that you cancel the context set with WithContext and wait for Run to return.
func WithHznControl ¶
func WithHznControl(client hznpb.ControlManagementClient) Option
WithHznControl
type TestServerData ¶
type TestServerData struct { Addr string Client pb.WaypointHznClient Hzn *hzntest.DevSetup // contains filtered or unexported fields }
func TestServer ¶
func TestServer(t testing.T, opts ...Option) *TestServerData
TestServer starts a server and returns various data such as the client for that server. We use t.Cleanup to ensure resources are automatically cleaned up.