Documentation ¶
Index ¶
- Constants
- Variables
- func New(opts ...Option) (pb.WaypointServer, error)
- func TestApp(t testing.T, client pb.WaypointClient, ref *pb.Ref_Application)
- func TestEntrypoint(t testing.T, client pb.WaypointClient) (string, string, func())
- func TestImpl(t testing.T, opts ...Option) pb.WaypointServer
- func TestRunner(t testing.T, client pb.WaypointClient, r *pb.Runner) (string, func())
- func TestServer(t testing.T, opts ...Option) pb.WaypointClient
- type Option
Constants ¶
const ( // The user that all tokens are encoded with. The server has a single server model // so all actions are mapped to this user. DefaultUser = "waypoint" // The identifier for the default key to use to generating tokens. DefaultKeyId = "k1" )
Variables ¶
var (
ErrInvalidToken = errors.New("invalid authentication token")
)
Functions ¶
func New ¶
func New(opts ...Option) (pb.WaypointServer, error)
New returns a Waypoint server implementation that uses BotlDB plus in-memory locks to operate safely.
func TestApp ¶
func TestApp(t testing.T, client pb.WaypointClient, ref *pb.Ref_Application)
TestApp creates the app in the DB.
func TestEntrypoint ¶
func TestEntrypoint(t testing.T, client pb.WaypointClient) (string, string, func())
func TestImpl ¶
func TestImpl(t testing.T, opts ...Option) pb.WaypointServer
TestImpl returns the waypoint server implementation. This can be used with server.TestServer. It is easier to just use TestServer directly.
func TestRunner ¶
func TestRunner(t testing.T, client pb.WaypointClient, r *pb.Runner) (string, func())
TestRunner registers a runner and returns the ID and a function to deregister the runner. This uses t.Cleanup so that the runner will always be deregistered on test completion.
func TestServer ¶
func TestServer(t testing.T, opts ...Option) pb.WaypointClient
TestServer starts a singleprocess server and returns the connected client. We use t.Cleanup to ensure resources are automatically cleaned up.
Types ¶
type Option ¶
type Option func(*service, *config) error
func TestWithURLService ¶
TestWithURLService is an Option for testing only that creates an in-memory URL service server. This requires access to an external postgres server.
If out is non-nil, it will be written to with the DevSetup info.
func WithAcceptURLTerms ¶
func WithConfig ¶
func WithConfig(scfg *serverconfig.Config) Option
WithConfig sets the server config in use with this server.
func WithLogger ¶
func WithLogger(log hclog.Logger) Option
WithLogger sets the logger for use with the server.
Source Files ¶
- auth.go
- service.go
- service_artifact.go
- service_build.go
- service_config.go
- service_deploy.go
- service_entrypoint.go
- service_exec.go
- service_hostname.go
- service_instance.go
- service_job.go
- service_logs.go
- service_project.go
- service_release.go
- service_runner.go
- service_server.go
- service_snapshot.go
- service_url.go
- service_version.go
- service_workspace.go
- testing.go