Documentation ¶
Overview ¶
Package expansionx contains utilities for starting expansion services for cross-language transforms. All code in this package is currently experimental.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBeamJar ¶
GetBeamJar checks a temporary directory for the desired Beam JAR, downloads the appropriate JAR from Maven if not present, then returns the file path to the JAR.
Types ¶
type ExpansionServiceRunner ¶
type ExpansionServiceRunner struct {
// contains filtered or unexported fields
}
ExpansionServiceRunner is a type that holds information required to start up a Beam Expansion Service JAR and maintain a handle on the process running the service to enable shutdown as well.
func NewExpansionServiceRunner ¶
func NewExpansionServiceRunner(jarPath, servicePort string) (*ExpansionServiceRunner, error)
NewExpansionServiceRunner builds an ExpansionServiceRunner struct for a given gradle target and Beam version and returns a pointer to it. Passing an empty string as servicePort will request an open port to be assigned to the service.
func (*ExpansionServiceRunner) Endpoint ¶
func (e *ExpansionServiceRunner) Endpoint() string
Endpoint returns the formatted endpoint the ExpansionServiceRunner is set to start the expansion service on.
func (*ExpansionServiceRunner) StartService ¶
func (e *ExpansionServiceRunner) StartService() error
StartService starts the expansion service for a given ExpansionServiceRunner. If this is called and does not return an error, the expansion service will be running in the background until StopService is called. This will leak resources if not addressed.
func (*ExpansionServiceRunner) StopService ¶
func (e *ExpansionServiceRunner) StopService() error
StopService stops the expansion service for a given ExpansionServiceRunner. Returns an error if the command hasn't been run or if the process has already exited.
func (*ExpansionServiceRunner) String ¶
func (e *ExpansionServiceRunner) String() string