Platform
Warning
This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.
https://pkg.go.dev/github.com/hashicorp/waypoint-plugin-sdk/component#Platform
The Platform
component is where you handle interaction between Waypoint and the destination platform. It is handled
through the implementation of the DeployFunc interface and optionally the PlatformReleaser
interface.
The Platform component is responsible for deploying your application to the destination platform, for example say you wish to deploy the application to Google Cloud Run, the DeployFunc callback would be where you would define the interaction with the Cloud Run APIs.
A platform component can be created by implementing the Platform interface, Platform has a single function DeployFunc from which you return a function which will be called by Waypoint.
The following code snippet shows an example of the implementation of DeployFunc
, the signature for the function returned
from DeployFunc can be defined to accept the Default Mappers, in addition it can accept the data model which was returned
from the Registry
component.