Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlowStatusStrings ¶ added in v1.0.0
func FlowStatusStrings() []string
FlowStatusStrings returns a slice of all String values of the enum
Types ¶
type Client ¶
type Client interface { StartFlow(ctx context.Context, controlPoint string, labels map[string]string) (Flow, error) Shutdown(ctx context.Context) error HTTPMiddleware(controlPoint string, labels map[string]string, timeout time.Duration) func(http.Handler) http.Handler GRPCUnaryInterceptor(controlPoint string, labels map[string]string, timeout time.Duration) func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) }
Client is the interface that is provided to the user upon which they can perform Check calls for their service and eventually shut down in case of error.
type Flow ¶
type Flow interface { Accepted() bool End(status FlowStatus) error CheckResponse() *flowcontrol.CheckResponse }
Flow is the interface that is returned to the user every time a Check call through ApertureClient is made. The user can check the status of the check call, response from the server, and end the flow once the workload is executed.
type FlowStatus ¶ added in v1.0.0
type FlowStatus uint8
FlowStatus represents status of flow execution.
const ( // OK indicates successful flow execution. OK FlowStatus = iota // Error indicate error on flow execution. Error )
User passes a code to indicate status of flow execution.
func FlowStatusString ¶ added in v1.0.0
func FlowStatusString(s string) (FlowStatus, error)
FlowStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func FlowStatusValues ¶ added in v1.0.0
func FlowStatusValues() []FlowStatus
FlowStatusValues returns all values of the enum
func (FlowStatus) IsAFlowStatus ¶ added in v1.0.0
func (i FlowStatus) IsAFlowStatus() bool
IsAFlowStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (FlowStatus) String ¶ added in v1.0.0
func (i FlowStatus) String() string