Documentation ¶
Index ¶
- Constants
- func COARequestEquals(a, b *COARequest) bool
- func EventEquals(e1, e2 *Event) bool
- func EventShouldRetryWrapper(handler EventHandler, topic string, message Event) bool
- func IsBadConfig(err error) bool
- func IsDelayed(err error) bool
- func IsNotFound(err error) bool
- func IsRetriableErr(err error) bool
- type ActivationData
- type COAError
- type COAHandler
- type COARequest
- type COAResponse
- type ContextKey
- type Endpoint
- type Event
- type EventHandler
- type HeartBeatAction
- type HeartBeatData
- type IEdge
- type INode
- type InputOutputData
- type JobAction
- type JobData
- type SafeBuffer
- type SiteConnection
- type SiteInfo
- type State
- type Terminable
- type Trail
Constants ¶
View Source
const ( COAMetaHeader = "COA_META_HEADER" TracingExporterConsole = "tracing.exporters.console" MetricsExporterOTLPgRPC = "metrics.exporters.otlpgrpc" TracingExporterZipkin = "tracing.exporters.zipkin" TracingExporterOTLPgRPC = "tracing.exporters.otlpgrpc" LogExporterConsole = "log.exporters.console" LogExporterOTLPgRPC = "log.exporters.otlpgrpc" LogExporterOTLPhTTP = "log.exporters.otlphttp" ProvidersPersistentState = "providers.persistentstate" ProvidersVolatileState = "providers.volatilestate" ProvidersConfig = "providers.config" ProvidersSecret = "providers.secret" ProvidersReference = "providers.reference" ProvidersProbe = "providers.probe" ProvidersUploader = "providers.uploader" ProvidersReporter = "providers.reporter" ProviderQueue = "providers.queue" ProviderLedger = "providers.ledger" StatusOutput = "__status" ErrorOutput = "__error" StateOutput = "__state" )
Variables ¶
This section is empty.
Functions ¶
func COARequestEquals ¶
func COARequestEquals(a, b *COARequest) bool
func EventEquals ¶
func EventShouldRetryWrapper ¶
func EventShouldRetryWrapper(handler EventHandler, topic string, message Event) bool
func IsBadConfig ¶
func IsNotFound ¶
func IsRetriableErr ¶
Types ¶
type ActivationData ¶
type ActivationData struct { Campaign string `json:"campaign"` Namespace string `json:"namespace,omitempty"` Activation string `json:"activation"` ActivationGeneration string `json:"activationGeneration"` Stage string `json:"stage"` Inputs map[string]interface{} `json:"inputs,omitempty"` Outputs map[string]map[string]interface{} `json:"outputs,omitempty"` Provider string `json:"provider,omitempty"` Config interface{} `json:"config,omitempty"` TriggeringStage string `json:"triggeringStage,omitempty"` Schedule string `json:"schedule,omitempty"` NeedsReport bool `json:"needsReport,omitempty"` }
func (ActivationData) MarshalJSON ¶
func (s ActivationData) MarshalJSON() ([]byte, error)
MarshalJSON customizes the JSON marshalling for ActivationData
func (ActivationData) ShouldFireNow ¶
func (s ActivationData) ShouldFireNow() (bool, error)
func (*ActivationData) UnmarshalJSON ¶
func (s *ActivationData) UnmarshalJSON(data []byte) error
UnmarshalJSON customizes the JSON unmarshalling for ActivationData
type COAError ¶
func FromHTTPResponseCode ¶
type COAHandler ¶
type COAHandler func(COARequest) COAResponse
type COARequest ¶
type COARequest struct { Context context.Context `json:"-"` Method string `json:"method"` Route string `json:"route"` ContentType string `json:"contentType"` Body []byte `json:"body"` Metadata map[string]string `json:"metadata,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
func (*COARequest) DeepCopy ¶
func (in *COARequest) DeepCopy() *COARequest
func (*COARequest) DeepCopyInto ¶
func (in *COARequest) DeepCopyInto(out *COARequest)
func (COARequest) DeepEquals ¶
func (in COARequest) DeepEquals(other COARequest) bool
func (COARequest) MarshalJSON ¶
func (in COARequest) MarshalJSON() ([]byte, error)
func (*COARequest) UnmarshalJSON ¶
func (in *COARequest) UnmarshalJSON(data []byte) error
type COAResponse ¶
type COAResponse struct { ContentType string `json:"contentType"` Body []byte `json:"body"` State State `json:"state"` Metadata map[string]string `json:"metadata,omitempty"` RedirectUri string `json:"redirectUri,omitempty"` }
func (COAResponse) Println ¶
func (c COAResponse) Println()
func (COAResponse) String ¶
func (c COAResponse) String() string
type ContextKey ¶
type ContextKey string
const (
COAFastHTTPContextKey ContextKey = "coa-fasthttp-context"
)
type Endpoint ¶
type Endpoint struct { Methods []string Version string Route string Handler COAHandler Parameters []string }
type Event ¶
type Event struct { Metadata map[string]string `json:"metadata"` Body interface{} `json:"body"` Context context.Context `json:"-"` }
func (Event) DeepEquals ¶
func (Event) MarshalBinary ¶
func (Event) MarshalJSON ¶
func (*Event) UnmarshalJSON ¶
type EventHandler ¶
type HeartBeatAction ¶
type HeartBeatAction string
const ( HeartBeatUpdate HeartBeatAction = "UPDATE" HeartBeatDelete HeartBeatAction = "DELETE" )
type HeartBeatData ¶
type InputOutputData ¶
type SafeBuffer ¶
type SafeBuffer struct {
// contains filtered or unexported fields
}
func (*SafeBuffer) Reset ¶
func (sb *SafeBuffer) Reset()
func (*SafeBuffer) String ¶
func (sb *SafeBuffer) String() string
type SiteConnection ¶
type SiteInfo ¶
type SiteInfo struct { SiteId string `json:"siteId"` Properties map[string]string `json:"properties,omitempty"` ParentSite SiteConnection `json:"parentSite,omitempty"` CurrentSite SiteConnection `json:"currentSite"` }
type State ¶
type State uint16
State represents a response state
const ( None State = 0 // OK = HTTP 200 OK State = 200 // Accepted = HTTP 202 Accepted State = 202 // BadRequest = HTTP 400 BadRequest State = 400 Unauthorized State = 403 // NotFound = HTTP 404 NotFound State = 404 // MethodNotAllowed = HTTP 405 MethodNotAllowed State = 405 Conflict State = 409 // InternalError = HTTP 500 InternalError State = 500 // Config errors BadConfig State = 1000 MissingConfig State = 1001 // API invocation errors InvalidArgument State = 2000 APIRedirect State = 3030 // IO errors FileAccessError State = 4000 // Serialization errors SerializationError State = 5000 DeserializeError State = 5001 // Async requets DeleteRequested State = 6000 // Operation results UpdateFailed State = 8001 DeleteFailed State = 8002 ValidateFailed State = 8003 Updated State = 8004 Deleted State = 8005 // Workflow status Running State = 9994 Paused State = 9995 Done State = 9996 Delayed State = 9997 Untouched State = 9998 NotImplemented State = 9999 // To have clearer metrics/self-explanatory errors, we introduce some // detailed error codes InitFailed State = 10000 CreateActionConfigFailed State = 10001 HelmActionFailed State = 10002 GetComponentSpecFailed State = 10003 CreateProjectorFailed State = 10004 K8sRemoveServiceFailed State = 10005 K8sRemoveDeploymentFailed State = 10006 K8sDeploymentFailed State = 10007 ReadYamlFailed State = 10008 ApplyYamlFailed State = 10009 ReadResourcePropertyFailed State = 10010 ApplyResourceFailed State = 10011 DeleteYamlFailed State = 10012 DeleteResourceFailed State = 10013 CheckResourceStatusFailed State = 10014 ApplyScriptFailed State = 10015 RemoveScriptFailed State = 10016 YamlResourcePropertyNotFound State = 10017 GetHelmPropertyFailed State = 10018 HelmChartPullFailed State = 10019 HelmChartLoadFailed State = 10020 HelmChartApplyFailed State = 10021 HelmChartUninstallFailed State = 10022 IngressApplyFailed State = 10023 HttpNewRequestFailed State = 10024 HttpSendRequestFailed State = 10025 HttpErrorResponse State = 10026 MqttPublishFailed State = 10027 MqttApplyFailed State = 10028 MqttApplyTimeout State = 10029 ConfigMapApplyFailed State = 10030 HttpBadWaitStatusCode State = 10031 HttpNewWaitRequestFailed State = 10032 HttpSendWaitRequestFailed State = 10033 HttpErrorWaitResponse State = 10034 HttpBadWaitExpression State = 10035 ScriptExecutionFailed State = 10036 ScriptResultParsingFailed State = 10037 WaitToGetInstancesFailed State = 10038 WaitToGetSitesFailed State = 10039 WaitToGetCatalogsFailed State = 10040 InvalidWaitObjectType State = 10041 CatalogsGetFailed State = 10042 InvalidInstanceCatalog State = 10043 CreateInstanceFromCatalogFailed State = 10044 InvalidSolutionCatalog State = 10045 CreateSolutionFromCatalogFailed State = 10046 InvalidTargetCatalog State = 10047 CreateTargetFromCatalogFailed State = 10048 InvalidCatalogCatalog State = 10049 CreateCatalogFromCatalogFailed State = 10050 ParentObjectMissing State = 10051 ParentObjectCreateFailed State = 10052 MaterializeBatchFailed State = 10053 DeleteInstanceFailed State = 10054 CreateInstanceFailed State = 10055 DeploymentNotReached State = 10056 InvalidObjectType State = 10057 UnsupportedAction State = 10058 // instance controller errors SolutionGetFailed State = 11000 TargetCandidatesNotFound State = 11001 TargetListGetFailed State = 11002 ObjectInstanceCoversionFailed State = 11003 TimedOut State = 11004 //target controller errors TargetPropertyNotFound State = 12000 )
func GetHttpStatus ¶
func (State) EqualsWithString ¶
type Terminable ¶
State represents a response state
Source Files ¶
Click to show internal directories.
Click to hide internal directories.