Documentation
¶
Overview ¶
Code generated by idl2go from JSON generated by Barrister v0.1.6
Index ¶
- Constants
- Variables
- func HealthCheckSeconds(d *DockerComponent) int64
- func NewJSONServer(idl *barrister.Idl, forceASCII bool, maelstromservice MaelstromService, ...) barrister.Server
- func NewServer(idl *barrister.Idl, ser barrister.Serializer, ...) barrister.Server
- type AwsLifecycleHook
- type AwsStepFunctionEventSource
- type Component
- type ComponentActivity
- type ComponentDelta
- type ComponentDeltaError
- type ComponentInfo
- type ComponentStatus
- type ComponentTarget
- type ComponentWithEventSources
- type CronEventSource
- type CronHttpRequest
- type DataChangedUnion
- type DockerComponent
- type EventSource
- type EventSourceType
- type EventSourceWithStatus
- type GetComponentInput
- type GetComponentOutput
- type GetEventSourceInput
- type GetEventSourceOutput
- type GetNodeStatusInput
- type GetNodeStatusOutput
- type GetProjectInput
- type GetProjectOutput
- type HttpEventSource
- type ListComponentsInput
- type ListComponentsOutput
- type ListEventSourcesInput
- type ListEventSourcesOutput
- type ListNodeStatusInput
- type ListNodeStatusOutput
- type ListProjectsInput
- type ListProjectsOutput
- type MaelstromService
- type MaelstromServiceProxy
- func (_p MaelstromServiceProxy) GetComponent(input GetComponentInput) (GetComponentOutput, error)
- func (_p MaelstromServiceProxy) GetEventSource(input GetEventSourceInput) (GetEventSourceOutput, error)
- func (_p MaelstromServiceProxy) GetProject(input GetProjectInput) (GetProjectOutput, error)
- func (_p MaelstromServiceProxy) ListComponents(input ListComponentsInput) (ListComponentsOutput, error)
- func (_p MaelstromServiceProxy) ListEventSources(input ListEventSourcesInput) (ListEventSourcesOutput, error)
- func (_p MaelstromServiceProxy) ListProjects(input ListProjectsInput) (ListProjectsOutput, error)
- func (_p MaelstromServiceProxy) NotifyDataChanged(input NotifyDataChangedInput) (NotifyDataChangedOutput, error)
- func (_p MaelstromServiceProxy) PutComponent(input PutComponentInput) (PutComponentOutput, error)
- func (_p MaelstromServiceProxy) PutEventSource(input PutEventSourceInput) (PutEventSourceOutput, error)
- func (_p MaelstromServiceProxy) PutProject(input PutProjectInput) (PutProjectOutput, error)
- func (_p MaelstromServiceProxy) RemoveComponent(input RemoveComponentInput) (RemoveComponentOutput, error)
- func (_p MaelstromServiceProxy) RemoveEventSource(input RemoveEventSourceInput) (RemoveEventSourceOutput, error)
- func (_p MaelstromServiceProxy) RemoveProject(input RemoveProjectInput) (RemoveProjectOutput, error)
- func (_p MaelstromServiceProxy) ToggleEventSources(input ToggleEventSourcesInput) (ToggleEventSourcesOutput, error)
- type NameValue
- type NodeService
- type NodeServiceProxy
- func (_p NodeServiceProxy) GetStatus(input GetNodeStatusInput) (GetNodeStatusOutput, error)
- func (_p NodeServiceProxy) ListNodeStatus(input ListNodeStatusInput) (ListNodeStatusOutput, error)
- func (_p NodeServiceProxy) PlaceComponent(input PlaceComponentInput) (PlaceComponentOutput, error)
- func (_p NodeServiceProxy) StartStopComponents(input StartStopComponentsInput) (StartStopComponentsOutput, error)
- func (_p NodeServiceProxy) StatusChanged(input StatusChangedInput) (StatusChangedOutput, error)
- func (_p NodeServiceProxy) TerminateNode(input TerminateNodeInput) (TerminateNodeOutput, error)
- type NodeStatus
- type NotifyDataChangedInput
- type NotifyDataChangedOutput
- type PlaceComponentInput
- type PlaceComponentOutput
- type Project
- type ProjectInfo
- type PutComponentInput
- type PutComponentOutput
- type PutEventSourceInput
- type PutEventSourceOutput
- type PutProjectInput
- type PutProjectOutput
- type RemoveComponentInput
- type RemoveComponentOutput
- type RemoveEventSourceInput
- type RemoveEventSourceOutput
- type RemoveProjectInput
- type RemoveProjectOutput
- type RestartOrder
- type SqsEventSource
- type StartParallelism
- type StartStopComponentsInput
- type StartStopComponentsOutput
- type StatusChangedInput
- type StatusChangedOutput
- type TerminateNodeInput
- type TerminateNodeOutput
- type ToggleEventSourcesInput
- type ToggleEventSourcesOutput
- type VolumeMount
Constants ¶
View Source
const ( EventSourceTypeHttp EventSourceType = "http" EventSourceTypeCron = "cron" EventSourceTypeSqs = "sqs" EventSourceTypeAwsstepfunc = "awsstepfunc" )
View Source
const ( StartParallelismParallel StartParallelism = "parallel" StartParallelismSeries = "series" StartParallelismSeriesfirst = "seriesfirst" )
View Source
const ( ComponentStatusActive ComponentStatus = "active" ComponentStatusStarting = "starting" ComponentStatusStopping = "stopping" )
View Source
const BarristerChecksum string = "87ef9444ef9262bbe7d97cb2e46997e8"
View Source
const BarristerDateGenerated int64 = 1606767518809000000
View Source
const BarristerVersion string = "0.1.6"
Variables ¶
View Source
var IdlJsonRaw = `` /* 97083-byte string literal not displayed */
Functions ¶
func HealthCheckSeconds ¶
func HealthCheckSeconds(d *DockerComponent) int64
func NewJSONServer ¶
func NewJSONServer(idl *barrister.Idl, forceASCII bool, maelstromservice MaelstromService, nodeservice NodeService) barrister.Server
func NewServer ¶
func NewServer(idl *barrister.Idl, ser barrister.Serializer, maelstromservice MaelstromService, nodeservice NodeService) barrister.Server
Types ¶
type AwsLifecycleHook ¶
type AwsLifecycleHook struct { QueueUrl string `json:"QueueUrl"` MessageReceiptHandle string `json:"MessageReceiptHandle"` AutoScalingGroupName string `json:"AutoScalingGroupName"` InstanceId string `json:"InstanceId"` LifecycleActionToken string `json:"LifecycleActionToken"` LifecycleHookName string `json:"LifecycleHookName"` }
type Component ¶
type Component struct { Name string `json:"name"` ProjectName string `json:"projectName,omitempty"` Environment []NameValue `json:"environment"` MinInstances int64 `json:"minInstances,omitempty"` MaxInstances int64 `json:"maxInstances,omitempty"` MaxInstancesPerNode int64 `json:"maxInstancesPerNode,omitempty"` MaxConcurrency int64 `json:"maxConcurrency"` SoftConcurrencyLimit bool `json:"softConcurrencyLimit,omitempty"` ScaleUpConcurrencyPct float64 `json:"scaleUpConcurrencyPct,omitempty"` ScaleDownConcurrencyPct float64 `json:"scaleDownConcurrencyPct,omitempty"` MaxDurationSeconds int64 `json:"maxDurationSeconds,omitempty"` StartParallelism StartParallelism `json:"startParallelism,omitempty"` RestartOrder RestartOrder `json:"RestartOrder,omitempty"` Version int64 `json:"version"` ModifiedAt int64 `json:"modifiedAt,omitempty"` Docker *DockerComponent `json:"docker,omitempty"` }
type ComponentActivity ¶
type ComponentDelta ¶
type ComponentDeltaError ¶
type ComponentDeltaError struct { ComponentDelta ComponentDelta `json:"componentDelta"` Error string `json:"error"` }
type ComponentInfo ¶
type ComponentInfo struct { ComponentName string `json:"componentName"` ComponentVersion int64 `json:"componentVersion"` Status ComponentStatus `json:"status"` MaxConcurrency int64 `json:"maxConcurrency"` MemoryReservedMiB int64 `json:"memoryReservedMiB"` StartTime int64 `json:"startTime"` LastRequestTime int64 `json:"lastRequestTime"` TotalRequests int64 `json:"totalRequests"` Activity []ComponentActivity `json:"activity"` }
type ComponentStatus ¶
type ComponentStatus string
type ComponentTarget ¶
type ComponentWithEventSources ¶
type ComponentWithEventSources struct { Component Component `json:"component"` EventSources []EventSourceWithStatus `json:"eventSources"` }
type CronEventSource ¶
type CronEventSource struct { Schedule string `json:"schedule"` Http CronHttpRequest `json:"http"` }
type CronHttpRequest ¶
type DataChangedUnion ¶
type DataChangedUnion struct { PutComponent *Component `json:"putComponent,omitempty"` RemoveComponent *RemoveComponentOutput `json:"removeComponent,omitempty"` }
type DockerComponent ¶
type DockerComponent struct { Image string `json:"image"` Command []string `json:"command,omitempty"` Entrypoint []string `json:"entrypoint,omitempty"` HttpPort int64 `json:"httpPort"` HttpHealthCheckPath string `json:"httpHealthCheckPath"` HttpStartHealthCheckSeconds int64 `json:"httpStartHealthCheckSeconds,omitempty"` HttpHealthCheckSeconds int64 `json:"httpHealthCheckSeconds,omitempty"` HttpHealthCheckMaxFailures int64 `json:"httpHealthCheckMaxFailures,omitempty"` HealthCheckFailedCommand []string `json:"healthCheckFailedCommand,omitempty"` IdleTimeoutSeconds int64 `json:"idleTimeoutSeconds,omitempty"` Ports []string `json:"ports,omitempty"` Volumes []VolumeMount `json:"volumes,omitempty"` NetworkName string `json:"networkName,omitempty"` LogDriver string `json:"logDriver,omitempty"` LogDriverOptions []NameValue `json:"logDriverOptions,omitempty"` ReserveMemoryMiB int64 `json:"reserveMemoryMiB,omitempty"` LimitMemoryMiB int64 `json:"limitMemoryMiB,omitempty"` PullCommand []string `json:"pullCommand,omitempty"` PullUsername string `json:"pullUsername,omitempty"` PullPassword string `json:"pullPassword,omitempty"` PullImageOnPut bool `json:"pullImageOnPut,omitempty"` PullImageOnStart bool `json:"pullImageOnStart,omitempty"` Dns []string `json:"dns,omitempty"` DnsOptions []string `json:"dnsOptions,omitempty"` DnsSearch []string `json:"dnsSearch,omitempty"` Ulimits []string `json:"ulimits,omitempty"` Init bool `json:"init,omitempty"` }
type EventSource ¶
type EventSource struct { Name string `json:"name"` ComponentName string `json:"componentName"` ProjectName string `json:"projectName,omitempty"` Version int64 `json:"version"` ModifiedAt int64 `json:"modifiedAt"` Http *HttpEventSource `json:"http,omitempty"` Cron *CronEventSource `json:"cron,omitempty"` Sqs *SqsEventSource `json:"sqs,omitempty"` Awsstepfunc *AwsStepFunctionEventSource `json:"awsstepfunc,omitempty"` }
type EventSourceType ¶
type EventSourceType string
func GetEventSourceType ¶
func GetEventSourceType(e EventSource) EventSourceType
func StrToEventSourceType ¶
func StrToEventSourceType(esType string) (EventSourceType, error)
type EventSourceWithStatus ¶
type EventSourceWithStatus struct { EventSource EventSource `json:"eventSource"` Enabled bool `json:"enabled"` }
type GetComponentInput ¶
type GetComponentInput struct {
Name string `json:"name"`
}
type GetComponentOutput ¶
type GetComponentOutput struct {
Component Component `json:"component"`
}
type GetEventSourceInput ¶
type GetEventSourceInput struct {
Name string `json:"name"`
}
type GetEventSourceOutput ¶
type GetEventSourceOutput struct {
EventSource EventSource `json:"eventSource"`
}
type GetNodeStatusInput ¶
type GetNodeStatusInput struct {
Status *NodeStatus `json:"status,omitempty"`
}
type GetNodeStatusOutput ¶
type GetNodeStatusOutput struct {
Status NodeStatus `json:"status"`
}
type GetProjectInput ¶
type GetProjectInput struct {
Name string `json:"name"`
}
type GetProjectOutput ¶
type GetProjectOutput struct {
Project Project `json:"project"`
}
type HttpEventSource ¶
type ListComponentsInput ¶
type ListComponentsOutput ¶
type ListEventSourcesInput ¶
type ListEventSourcesInput struct { NamePrefix string `json:"namePrefix,omitempty"` ComponentName string `json:"componentName,omitempty"` ProjectName string `json:"projectName,omitempty"` EventSourceType EventSourceType `json:"eventSourceType,omitempty"` Limit int64 `json:"limit,omitempty"` NextToken string `json:"nextToken,omitempty"` }
type ListEventSourcesOutput ¶
type ListEventSourcesOutput struct { EventSources []EventSourceWithStatus `json:"eventSources"` NextToken string `json:"nextToken,omitempty"` }
type ListNodeStatusInput ¶
type ListNodeStatusInput struct {
ForceRefresh bool `json:"forceRefresh,omitempty"`
}
type ListNodeStatusOutput ¶
type ListNodeStatusOutput struct { RespondingNodeId string `json:"respondingNodeId"` Nodes []NodeStatus `json:"nodes"` }
type ListProjectsInput ¶
type ListProjectsInput struct {
NamePrefix string `json:"namePrefix,omitempty"`
}
type ListProjectsOutput ¶
type ListProjectsOutput struct {
Projects []ProjectInfo `json:"projects"`
}
type MaelstromService ¶
type MaelstromService interface { ListProjects(input ListProjectsInput) (ListProjectsOutput, error) PutProject(input PutProjectInput) (PutProjectOutput, error) GetProject(input GetProjectInput) (GetProjectOutput, error) RemoveProject(input RemoveProjectInput) (RemoveProjectOutput, error) PutComponent(input PutComponentInput) (PutComponentOutput, error) GetComponent(input GetComponentInput) (GetComponentOutput, error) RemoveComponent(input RemoveComponentInput) (RemoveComponentOutput, error) ListComponents(input ListComponentsInput) (ListComponentsOutput, error) PutEventSource(input PutEventSourceInput) (PutEventSourceOutput, error) GetEventSource(input GetEventSourceInput) (GetEventSourceOutput, error) RemoveEventSource(input RemoveEventSourceInput) (RemoveEventSourceOutput, error) ToggleEventSources(input ToggleEventSourcesInput) (ToggleEventSourcesOutput, error) ListEventSources(input ListEventSourcesInput) (ListEventSourcesOutput, error) NotifyDataChanged(input NotifyDataChangedInput) (NotifyDataChangedOutput, error) }
func NewMaelstromServiceProxy ¶
func NewMaelstromServiceProxy(c barrister.Client) MaelstromService
type MaelstromServiceProxy ¶
type MaelstromServiceProxy struct {
// contains filtered or unexported fields
}
func (MaelstromServiceProxy) GetComponent ¶
func (_p MaelstromServiceProxy) GetComponent(input GetComponentInput) (GetComponentOutput, error)
func (MaelstromServiceProxy) GetEventSource ¶
func (_p MaelstromServiceProxy) GetEventSource(input GetEventSourceInput) (GetEventSourceOutput, error)
func (MaelstromServiceProxy) GetProject ¶
func (_p MaelstromServiceProxy) GetProject(input GetProjectInput) (GetProjectOutput, error)
func (MaelstromServiceProxy) ListComponents ¶
func (_p MaelstromServiceProxy) ListComponents(input ListComponentsInput) (ListComponentsOutput, error)
func (MaelstromServiceProxy) ListEventSources ¶
func (_p MaelstromServiceProxy) ListEventSources(input ListEventSourcesInput) (ListEventSourcesOutput, error)
func (MaelstromServiceProxy) ListProjects ¶
func (_p MaelstromServiceProxy) ListProjects(input ListProjectsInput) (ListProjectsOutput, error)
func (MaelstromServiceProxy) NotifyDataChanged ¶
func (_p MaelstromServiceProxy) NotifyDataChanged(input NotifyDataChangedInput) (NotifyDataChangedOutput, error)
func (MaelstromServiceProxy) PutComponent ¶
func (_p MaelstromServiceProxy) PutComponent(input PutComponentInput) (PutComponentOutput, error)
func (MaelstromServiceProxy) PutEventSource ¶
func (_p MaelstromServiceProxy) PutEventSource(input PutEventSourceInput) (PutEventSourceOutput, error)
func (MaelstromServiceProxy) PutProject ¶
func (_p MaelstromServiceProxy) PutProject(input PutProjectInput) (PutProjectOutput, error)
func (MaelstromServiceProxy) RemoveComponent ¶
func (_p MaelstromServiceProxy) RemoveComponent(input RemoveComponentInput) (RemoveComponentOutput, error)
func (MaelstromServiceProxy) RemoveEventSource ¶
func (_p MaelstromServiceProxy) RemoveEventSource(input RemoveEventSourceInput) (RemoveEventSourceOutput, error)
func (MaelstromServiceProxy) RemoveProject ¶
func (_p MaelstromServiceProxy) RemoveProject(input RemoveProjectInput) (RemoveProjectOutput, error)
func (MaelstromServiceProxy) ToggleEventSources ¶
func (_p MaelstromServiceProxy) ToggleEventSources(input ToggleEventSourcesInput) (ToggleEventSourcesOutput, error)
type NodeService ¶
type NodeService interface { ListNodeStatus(input ListNodeStatusInput) (ListNodeStatusOutput, error) GetStatus(input GetNodeStatusInput) (GetNodeStatusOutput, error) StatusChanged(input StatusChangedInput) (StatusChangedOutput, error) PlaceComponent(input PlaceComponentInput) (PlaceComponentOutput, error) StartStopComponents(input StartStopComponentsInput) (StartStopComponentsOutput, error) TerminateNode(input TerminateNodeInput) (TerminateNodeOutput, error) }
func NewNodeServiceProxy ¶
func NewNodeServiceProxy(c barrister.Client) NodeService
type NodeServiceProxy ¶
type NodeServiceProxy struct {
// contains filtered or unexported fields
}
func (NodeServiceProxy) GetStatus ¶
func (_p NodeServiceProxy) GetStatus(input GetNodeStatusInput) (GetNodeStatusOutput, error)
func (NodeServiceProxy) ListNodeStatus ¶
func (_p NodeServiceProxy) ListNodeStatus(input ListNodeStatusInput) (ListNodeStatusOutput, error)
func (NodeServiceProxy) PlaceComponent ¶
func (_p NodeServiceProxy) PlaceComponent(input PlaceComponentInput) (PlaceComponentOutput, error)
func (NodeServiceProxy) StartStopComponents ¶
func (_p NodeServiceProxy) StartStopComponents(input StartStopComponentsInput) (StartStopComponentsOutput, error)
func (NodeServiceProxy) StatusChanged ¶
func (_p NodeServiceProxy) StatusChanged(input StatusChangedInput) (StatusChangedOutput, error)
func (NodeServiceProxy) TerminateNode ¶
func (_p NodeServiceProxy) TerminateNode(input TerminateNodeInput) (TerminateNodeOutput, error)
type NodeStatus ¶
type NodeStatus struct { NodeId string `json:"nodeId"` StartedAt int64 `json:"startedAt"` ObservedAt int64 `json:"observedAt"` Version int64 `json:"version"` PeerUrl string `json:"peerUrl"` TotalMemoryMiB int64 `json:"totalMemoryMiB"` FreeMemoryMiB int64 `json:"freeMemoryMiB"` NumCPUs int64 `json:"numCPUs"` LoadAvg1m float64 `json:"loadAvg1m"` LoadAvg5m float64 `json:"loadAvg5m"` LoadAvg15m float64 `json:"loadAvg15m"` RunningComponents []ComponentInfo `json:"runningComponents"` }
type NotifyDataChangedInput ¶
type NotifyDataChangedInput struct { NodeId string `json:"nodeId"` Changes []DataChangedUnion `json:"changes"` }
type NotifyDataChangedOutput ¶
type NotifyDataChangedOutput struct {
RespondingNodeId string `json:"respondingNodeId"`
}
type PlaceComponentInput ¶
type PlaceComponentInput struct {
ComponentName string `json:"componentName"`
}
type PlaceComponentOutput ¶
type PlaceComponentOutput struct { ComponentName string `json:"componentName"` Node NodeStatus `json:"node"` }
type Project ¶
type Project struct { Name string `json:"name"` Components []ComponentWithEventSources `json:"components"` }
type ProjectInfo ¶
type PutComponentInput ¶
type PutComponentInput struct {
Component Component `json:"component"`
}
type PutComponentOutput ¶
type PutEventSourceInput ¶
type PutEventSourceInput struct {
EventSource EventSource `json:"eventSource"`
}
type PutEventSourceOutput ¶
type PutProjectInput ¶
type PutProjectOutput ¶
type PutProjectOutput struct { Name string `json:"name"` ComponentsAdded []Component `json:"componentsAdded"` ComponentsUpdated []Component `json:"componentsUpdated"` ComponentsRemoved []string `json:"componentsRemoved"` EventSourcesAdded []EventSource `json:"eventSourcesAdded"` EventSourcesUpdated []EventSource `json:"eventSourcesUpdated"` EventSourcesRemoved []string `json:"eventSourcesRemoved"` }
type RemoveComponentInput ¶
type RemoveComponentInput struct {
Name string `json:"name"`
}
type RemoveComponentOutput ¶
type RemoveEventSourceInput ¶
type RemoveEventSourceInput struct {
Name string `json:"name"`
}
type RemoveEventSourceOutput ¶
type RemoveProjectInput ¶
type RemoveProjectInput struct {
Name string `json:"name"`
}
type RemoveProjectOutput ¶
type RestartOrder ¶
type RestartOrder string
const ( RestartOrderStartstop RestartOrder = "startstop" RestartOrderStopstart = "stopstart" )
type SqsEventSource ¶
type SqsEventSource struct { QueueName string `json:"queueName"` NameAsPrefix bool `json:"nameAsPrefix,omitempty"` Path string `json:"path"` MaxConcurrency int64 `json:"maxConcurrency,omitempty"` MessagesPerPoll int64 `json:"messagesPerPoll,omitempty"` ConcurrencyPerPoller int64 `json:"concurrencyPerPoller,omitempty"` VisibilityTimeout int64 `json:"visibilityTimeout,omitempty"` }
type StartParallelism ¶
type StartParallelism string
type StartStopComponentsInput ¶
type StartStopComponentsInput struct { ClientNodeId string `json:"clientNodeId"` TargetVersion int64 `json:"targetVersion"` TargetCounts []ComponentTarget `json:"targetCounts"` ReturnStatus bool `json:"returnStatus,omitempty"` Block bool `json:"block,omitempty"` }
type StartStopComponentsOutput ¶
type StartStopComponentsOutput struct { TargetVersionMismatch bool `json:"targetVersionMismatch"` TargetStatus *NodeStatus `json:"targetStatus,omitempty"` Started []ComponentDelta `json:"started"` Stopped []ComponentDelta `json:"stopped"` Errors []ComponentDeltaError `json:"errors"` }
type StatusChangedInput ¶
type StatusChangedInput struct { NodeId string `json:"nodeId"` Exiting bool `json:"exiting"` Status *NodeStatus `json:"status,omitempty"` }
type StatusChangedOutput ¶
type StatusChangedOutput struct {
NodeId string `json:"nodeId"`
}
type TerminateNodeInput ¶
type TerminateNodeInput struct {
AwsLifecycleHook *AwsLifecycleHook `json:"awsLifecycleHook,omitempty"`
}
type TerminateNodeOutput ¶
type ToggleEventSourcesInput ¶
type ToggleEventSourcesInput struct { Enabled bool `json:"enabled"` NamePrefix string `json:"namePrefix,omitempty"` ComponentName string `json:"componentName,omitempty"` ProjectName string `json:"projectName,omitempty"` EventSourceType EventSourceType `json:"eventSourceType,omitempty"` }
Click to show internal directories.
Click to hide internal directories.