Documentation
¶
Overview ¶
Package cynosure is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APIClient) error
- func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAPIServer(s *grpc.Server, srv APIServer)
- type APIClient
- type APIServer
- type Command
- func (*Command) Descriptor() ([]byte, []int)
- func (m *Command) GetArgs() []string
- func (m *Command) GetEntry() string
- func (m *Command) GetEnv() []string
- func (m *Command) GetImage() string
- func (m *Command) GetLines() int64
- func (m *Command) GetName() string
- func (m *Command) GetRequirements() map[string]*Deps
- func (*Command) ProtoMessage()
- func (m *Command) Reset()
- func (m *Command) String() string
- func (m *Command) XXX_DiscardUnknown()
- func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Command) XXX_Merge(src proto.Message)
- func (m *Command) XXX_Size() int
- func (m *Command) XXX_Unmarshal(b []byte) error
- type Dep
- func (*Dep) Descriptor() ([]byte, []int)
- func (m *Dep) GetIdentity() string
- func (m *Dep) GetWait() string
- func (*Dep) ProtoMessage()
- func (m *Dep) Reset()
- func (m *Dep) String() string
- func (m *Dep) XXX_DiscardUnknown()
- func (m *Dep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Dep) XXX_Merge(src proto.Message)
- func (m *Dep) XXX_Size() int
- func (m *Dep) XXX_Unmarshal(b []byte) error
- type Deps
- func (*Deps) Descriptor() ([]byte, []int)
- func (m *Deps) GetDeps() []*Dep
- func (*Deps) ProtoMessage()
- func (m *Deps) Reset()
- func (m *Deps) String() string
- func (m *Deps) XXX_DiscardUnknown()
- func (m *Deps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Deps) XXX_Merge(src proto.Message)
- func (m *Deps) XXX_Size() int
- func (m *Deps) XXX_Unmarshal(b []byte) error
- type EnvironmentRequest
- func (*EnvironmentRequest) Descriptor() ([]byte, []int)
- func (m *EnvironmentRequest) GetName() string
- func (m *EnvironmentRequest) GetValues() []string
- func (*EnvironmentRequest) ProtoMessage()
- func (m *EnvironmentRequest) Reset()
- func (m *EnvironmentRequest) String() string
- func (m *EnvironmentRequest) XXX_DiscardUnknown()
- func (m *EnvironmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnvironmentRequest) XXX_Merge(src proto.Message)
- func (m *EnvironmentRequest) XXX_Size() int
- func (m *EnvironmentRequest) XXX_Unmarshal(b []byte) error
- type EnvironmentResponse
- func (*EnvironmentResponse) Descriptor() ([]byte, []int)
- func (m *EnvironmentResponse) GetSuccess() bool
- func (*EnvironmentResponse) ProtoMessage()
- func (m *EnvironmentResponse) Reset()
- func (m *EnvironmentResponse) String() string
- func (m *EnvironmentResponse) XXX_DiscardUnknown()
- func (m *EnvironmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnvironmentResponse) XXX_Merge(src proto.Message)
- func (m *EnvironmentResponse) XXX_Size() int
- func (m *EnvironmentResponse) XXX_Unmarshal(b []byte) error
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (m *Filter) GetKey() string
- func (m *Filter) GetOp() Filter_Op
- func (m *Filter) GetType() Filter_Type
- func (m *Filter) GetValues() []string
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type Filter_Op
- type Filter_Type
- type ImageRequest
- func (*ImageRequest) Descriptor() ([]byte, []int)
- func (m *ImageRequest) GetIdentity() string
- func (m *ImageRequest) GetImage() []byte
- func (*ImageRequest) ProtoMessage()
- func (m *ImageRequest) Reset()
- func (m *ImageRequest) String() string
- func (m *ImageRequest) XXX_DiscardUnknown()
- func (m *ImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ImageRequest) XXX_Merge(src proto.Message)
- func (m *ImageRequest) XXX_Size() int
- func (m *ImageRequest) XXX_Unmarshal(b []byte) error
- type ImageResponse
- func (*ImageResponse) Descriptor() ([]byte, []int)
- func (m *ImageResponse) GetExists() bool
- func (m *ImageResponse) GetSuccess() bool
- func (*ImageResponse) ProtoMessage()
- func (m *ImageResponse) Reset()
- func (m *ImageResponse) String() string
- func (m *ImageResponse) XXX_DiscardUnknown()
- func (m *ImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ImageResponse) XXX_Merge(src proto.Message)
- func (m *ImageResponse) XXX_Size() int
- func (m *ImageResponse) XXX_Unmarshal(b []byte) error
- type InfoRequest
- func (*InfoRequest) Descriptor() ([]byte, []int)
- func (m *InfoRequest) GetIdentifier() string
- func (*InfoRequest) ProtoMessage()
- func (m *InfoRequest) Reset()
- func (m *InfoRequest) String() string
- func (m *InfoRequest) XXX_DiscardUnknown()
- func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InfoRequest) XXX_Merge(src proto.Message)
- func (m *InfoRequest) XXX_Size() int
- func (m *InfoRequest) XXX_Unmarshal(b []byte) error
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)
- func (m *InfoResponse) GetProcess() *Process
- func (*InfoResponse) ProtoMessage()
- func (m *InfoResponse) Reset()
- func (m *InfoResponse) String() string
- func (m *InfoResponse) XXX_DiscardUnknown()
- func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InfoResponse) XXX_Merge(src proto.Message)
- func (m *InfoResponse) XXX_Size() int
- func (m *InfoResponse) XXX_Unmarshal(b []byte) error
- type KV
- func (*KV) Descriptor() ([]byte, []int)
- func (m *KV) GetKey() string
- func (m *KV) GetValue() string
- func (*KV) ProtoMessage()
- func (m *KV) Reset()
- func (m *KV) String() string
- func (m *KV) XXX_DiscardUnknown()
- func (m *KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KV) XXX_Merge(src proto.Message)
- func (m *KV) XXX_Size() int
- func (m *KV) XXX_Unmarshal(b []byte) error
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)
- func (m *LogEntry) GetFields() string
- func (m *LogEntry) GetMessage() string
- func (m *LogEntry) GetPos() int64
- func (m *LogEntry) GetRaw() string
- func (m *LogEntry) GetSource() string
- func (m *LogEntry) GetTime() string
- func (*LogEntry) ProtoMessage()
- func (m *LogEntry) Reset()
- func (m *LogEntry) String() string
- func (m *LogEntry) XXX_DiscardUnknown()
- func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogEntry) XXX_Merge(src proto.Message)
- func (m *LogEntry) XXX_Size() int
- func (m *LogEntry) XXX_Unmarshal(b []byte) error
- type LogsRequest
- func (*LogsRequest) Descriptor() ([]byte, []int)
- func (m *LogsRequest) GetHead() int64
- func (m *LogsRequest) GetIdentifier() string
- func (m *LogsRequest) GetSince() string
- func (m *LogsRequest) GetTail() int64
- func (*LogsRequest) ProtoMessage()
- func (m *LogsRequest) Reset()
- func (m *LogsRequest) String() string
- func (m *LogsRequest) XXX_DiscardUnknown()
- func (m *LogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogsRequest) XXX_Merge(src proto.Message)
- func (m *LogsRequest) XXX_Size() int
- func (m *LogsRequest) XXX_Unmarshal(b []byte) error
- type LogsResponse
- func (*LogsResponse) Descriptor() ([]byte, []int)
- func (m *LogsResponse) GetContinue() string
- func (m *LogsResponse) GetCount() int64
- func (m *LogsResponse) GetEntries() []*LogEntry
- func (*LogsResponse) ProtoMessage()
- func (m *LogsResponse) Reset()
- func (m *LogsResponse) String() string
- func (m *LogsResponse) XXX_DiscardUnknown()
- func (m *LogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogsResponse) XXX_Merge(src proto.Message)
- func (m *LogsResponse) XXX_Size() int
- func (m *LogsResponse) XXX_Unmarshal(b []byte) error
- type Process
- func (*Process) Descriptor() ([]byte, []int)
- func (m *Process) GetCommand() *Command
- func (m *Process) GetIdentifier() string
- func (m *Process) GetNamespace() string
- func (m *Process) GetObservations() map[string]string
- func (m *Process) GetPid() int32
- func (m *Process) GetPorts() []string
- func (m *Process) GetReady() bool
- func (m *Process) GetRunning() int64
- func (m *Process) GetStarted() int64
- func (*Process) ProtoMessage()
- func (m *Process) Reset()
- func (m *Process) String() string
- func (m *Process) XXX_DiscardUnknown()
- func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Process) XXX_Merge(src proto.Message)
- func (m *Process) XXX_Size() int
- func (m *Process) XXX_Unmarshal(b []byte) error
- type RunningRequest
- func (*RunningRequest) Descriptor() ([]byte, []int)
- func (m *RunningRequest) GetFilters() []*Filter
- func (*RunningRequest) ProtoMessage()
- func (m *RunningRequest) Reset()
- func (m *RunningRequest) String() string
- func (m *RunningRequest) XXX_DiscardUnknown()
- func (m *RunningRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RunningRequest) XXX_Merge(src proto.Message)
- func (m *RunningRequest) XXX_Size() int
- func (m *RunningRequest) XXX_Unmarshal(b []byte) error
- type RunningResponse
- func (*RunningResponse) Descriptor() ([]byte, []int)
- func (m *RunningResponse) GetProcesses() []*Process
- func (*RunningResponse) ProtoMessage()
- func (m *RunningResponse) Reset()
- func (m *RunningResponse) String() string
- func (m *RunningResponse) XXX_DiscardUnknown()
- func (m *RunningResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RunningResponse) XXX_Merge(src proto.Message)
- func (m *RunningResponse) XXX_Size() int
- func (m *RunningResponse) XXX_Unmarshal(b []byte) error
- type StartRequest
- func (*StartRequest) Descriptor() ([]byte, []int)
- func (m *StartRequest) GetCommand() *Command
- func (m *StartRequest) GetEnvironments() []string
- func (m *StartRequest) GetLabels() []*KV
- func (m *StartRequest) GetNamespace() string
- func (m *StartRequest) GetWatches() map[string]*Watch
- func (*StartRequest) ProtoMessage()
- func (m *StartRequest) Reset()
- func (m *StartRequest) String() string
- func (m *StartRequest) XXX_DiscardUnknown()
- func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StartRequest) XXX_Merge(src proto.Message)
- func (m *StartRequest) XXX_Size() int
- func (m *StartRequest) XXX_Unmarshal(b []byte) error
- type StartResponse
- func (*StartResponse) Descriptor() ([]byte, []int)
- func (m *StartResponse) GetProcess() *Process
- func (*StartResponse) ProtoMessage()
- func (m *StartResponse) Reset()
- func (m *StartResponse) String() string
- func (m *StartResponse) XXX_DiscardUnknown()
- func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StartResponse) XXX_Merge(src proto.Message)
- func (m *StartResponse) XXX_Size() int
- func (m *StartResponse) XXX_Unmarshal(b []byte) error
- type StopRequest
- func (*StopRequest) Descriptor() ([]byte, []int)
- func (m *StopRequest) GetIdentifier() string
- func (*StopRequest) ProtoMessage()
- func (m *StopRequest) Reset()
- func (m *StopRequest) String() string
- func (m *StopRequest) XXX_DiscardUnknown()
- func (m *StopRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StopRequest) XXX_Merge(src proto.Message)
- func (m *StopRequest) XXX_Size() int
- func (m *StopRequest) XXX_Unmarshal(b []byte) error
- type StopResponse
- func (*StopResponse) Descriptor() ([]byte, []int)
- func (m *StopResponse) GetSuccess() bool
- func (*StopResponse) ProtoMessage()
- func (m *StopResponse) Reset()
- func (m *StopResponse) String() string
- func (m *StopResponse) XXX_DiscardUnknown()
- func (m *StopResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StopResponse) XXX_Merge(src proto.Message)
- func (m *StopResponse) XXX_Size() int
- func (m *StopResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedAPIServer
- func (*UnimplementedAPIServer) Environment(ctx context.Context, req *EnvironmentRequest) (*EnvironmentResponse, error)
- func (*UnimplementedAPIServer) Image(ctx context.Context, req *ImageRequest) (*ImageResponse, error)
- func (*UnimplementedAPIServer) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error)
- func (*UnimplementedAPIServer) Logs(ctx context.Context, req *LogsRequest) (*LogsResponse, error)
- func (*UnimplementedAPIServer) Running(ctx context.Context, req *RunningRequest) (*RunningResponse, error)
- func (*UnimplementedAPIServer) Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
- func (*UnimplementedAPIServer) Stop(ctx context.Context, req *StopRequest) (*StopResponse, error)
- type Watch
- func (*Watch) Descriptor() ([]byte, []int)
- func (m *Watch) GetMatch() string
- func (m *Watch) GetState() Watch_State
- func (*Watch) ProtoMessage()
- func (m *Watch) Reset()
- func (m *Watch) String() string
- func (m *Watch) XXX_DiscardUnknown()
- func (m *Watch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Watch) XXX_Merge(src proto.Message)
- func (m *Watch) XXX_Size() int
- func (m *Watch) XXX_Unmarshal(b []byte) error
- type Watch_State
Constants ¶
const (
Swagger = `{
"swagger": "2.0",
"info": {
"title": "cyno.proto",
"version": "1.0"
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/environment/{name}": {
"post": {
"summary": "Environment allows setting default environment values for all processes started in the specified namespace.",
"operationId": "Environment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureEnvironmentResponse"
}
}
},
"parameters": [
{
"name": "name",
"description": "Name of the environment.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cynosureEnvironmentRequest"
}
}
],
"tags": [
"API"
]
}
},
"/v1/image/{identity}": {
"get": {
"operationId": "Image",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureImageResponse"
}
}
},
"parameters": [
{
"name": "identity",
"description": "Identity of this image.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "image",
"description": "Image data (a tar.gz of the file system), if supplied creates the stored image.",
"in": "query",
"required": false,
"type": "string",
"format": "byte"
}
],
"tags": [
"API"
]
},
"post": {
"operationId": "Image2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureImageResponse"
}
}
},
"parameters": [
{
"name": "identity",
"description": "Identity of this image.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"description": "Image data (a tar.gz of the file system), if supplied creates the stored image.",
"in": "body",
"required": true,
"schema": {
"type": "string",
"format": "byte"
}
}
],
"tags": [
"API"
]
}
},
"/v1/info/{identifier}": {
"get": {
"summary": "Info provides information about a specific process.",
"operationId": "Info",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureInfoResponse"
}
}
},
"parameters": [
{
"name": "identifier",
"description": "Identifier of the process that should be interrogated.",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"API"
]
}
},
"/v1/logs/{identifier}": {
"get": {
"summary": "Logs returns log lines from the specified process.",
"operationId": "Logs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureLogsResponse"
}
}
},
"parameters": [
{
"name": "identifier",
"description": "Identifier of the process to get the logs for.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "head",
"description": "Head returns the top **N** log lines.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "tail",
"description": "Tail returns the bottom **N** log lines.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "since",
"description": "Since returns all log lines since the given UTC timestamp.\n\nTypically you will use the value from the previous ` + "`LogsResponse.Continue`" + ` field.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"API"
]
}
},
"/v1/running": {
"get": {
"summary": "Running will ` + "```return```" + ` a list of running processes that match the requested filter (or all).",
"operationId": "Running",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureRunningResponse"
}
}
},
"tags": [
"API"
]
},
"post": {
"summary": "Running will ` + "```return```" + ` a list of running processes that match the requested filter (or all).",
"operationId": "Running2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureRunningResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cynosureRunningRequest"
}
}
],
"tags": [
"API"
]
}
},
"/v1/start": {
"post": {
"summary": "Start creates a new process from the given request.",
"operationId": "Start",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureStartResponse"
}
}
},
"parameters": [
{
"name": "body",
"description": "Command to run.",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cynosureCommand"
}
}
],
"tags": [
"API"
]
}
},
"/v1/stop/{identifier}": {
"delete": {
"summary": "Stop terminates a specified process.",
"operationId": "Stop",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/cynosureStopResponse"
}
}
},
"parameters": [
{
"name": "identifier",
"description": "Identifier of the process to terminate.",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"API"
]
}
}
},
"definitions": {
"FilterOp": {
"type": "string",
"enum": [
"In",
"NotIn"
],
"default": "In",
"description": " - In: In requires that at least one of the values match.\n - NotIn: NotIn requires that none of the values are found."
},
"WatchState": {
"type": "string",
"enum": [
"Unchanged",
"MakeReady",
"NotReady"
],
"default": "Unchanged",
"description": "State changes.\n\n - Unchanged: Unchanged does not change the state of the process (default).\n - MakeReady: MakeReady changes the process state to ready, if not currently not-ready.\n - NotReady: NotReady changes the process state to not-ready, if currently ready."
},
"cynosureCommand": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name will be used as the prefix for the identifier."
},
"image": {
"type": "string",
"description": "Image is the uploaded image file to use as the filesystem."
},
"entry": {
"type": "string",
"description": "Entry is the command to execute as the entry-point."
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Args are supplied to the executable."
},
"env": {
"type": "array",
"items": {
"type": "string"
},
"description": "Env provides extra environment variables."
},
"requirements": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/cynosureDeps"
},
"description": "Requirements is a set of dependencies to be met before the command will be run."
},
"lines": {
"type": "string",
"format": "int64",
"description": "Lines is the number of log entries that have been produced (read-only)."
}
},
"description": "Command contains command information used to start a process and return information about a running command."
},
"cynosureDep": {
"type": "object",
"properties": {
"identity": {
"type": "string",
"description": "Identity of the broker to use, defined within the server configuration."
},
"wait": {
"type": "string",
"description": "Wait is the thing to wait for, how it is interpreted/found is up to the provider."
}
},
"description": "Dep contains dependency requirements."
},
"cynosureDeps": {
"type": "object",
"properties": {
"deps": {
"type": "array",
"items": {
"$ref": "#/definitions/cynosureDep"
},
"description": "Deps is the list of ` + "`Dep`" + ` items."
}
},
"description": "Deps is a list of Dep entries, any of which can fulfil the requirement."
},
"cynosureEnvironmentRequest": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the environment."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Values to provide for the namespace (` + "`key=value`" + `)."
}
},
"description": "EnvironmentRequest is the input supplied to the ` + "`Environment`" + ` API endpoint."
},
"cynosureEnvironmentResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"format": "boolean",
"description": "Success of the environment request."
}
},
"description": "EnvironmentResponse is the output supplied by the ` + "`Environment`" + ` API endpoint."
},
"cynosureFilter": {
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/cynosureFilterType",
"description": "Type of value to filter on."
},
"op": {
"$ref": "#/definitions/FilterOp",
"description": "Op is the matching type."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Values to match."
},
"key": {
"type": "string",
"description": "Key to match on (type dependant)."
}
},
"description": "Filter expresses how to match a ` + "`Process`" + `."
},
"cynosureFilterType": {
"type": "string",
"enum": [
"Namespace",
"Label"
],
"default": "Namespace",
"description": "Type is the kind of thing to match on.\n\n - Namespace: Namespace matches on the namespace of the process.\n - Label: Label matches on a label used to start a process (requires a ` + "`Filter.Key`" + `)."
},
"cynosureImageResponse": {
"type": "object",
"properties": {
"exists": {
"type": "boolean",
"format": "boolean",
"description": "Exists if the image exists in the system."
},
"success": {
"type": "boolean",
"format": "boolean",
"description": "Success if the image was created."
}
},
"description": "ImageResponse is the output supplied by the ` + "`Image`" + ` API endpoint."
},
"cynosureInfoResponse": {
"type": "object",
"properties": {
"process": {
"$ref": "#/definitions/cynosureProcess",
"description": "Process contains the running process that matched the identifier."
}
},
"description": "InfoResponse is the output supplied by the ` + "`Info`" + ` API endpoint."
},
"cynosureKV": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key of the value."
},
"value": {
"type": "string",
"description": "Value of the key."
}
},
"description": "KV is a simple key/value pair."
},
"cynosureLogEntry": {
"type": "object",
"properties": {
"pos": {
"type": "string",
"format": "int64",
"description": "Pos provides the line number for the log entry (starts at 1)."
},
"time": {
"type": "string",
"description": "Time that the log entry was processed."
},
"source": {
"type": "string",
"description": "Source of the log entry (` + "`out`, `err`, `debug`, `info`, `warning`, `error`, `fatal`" + `, etc)."
},
"raw": {
"type": "string",
"description": "Raw contents of the log line."
},
"message": {
"type": "string",
"description": "Message that was parsed out of the raw log line."
},
"fields": {
"type": "string",
"description": "Fields that were parsed out of the raw log line."
}
},
"description": "LogEntry of a log line from a process."
},
"cynosureLogsResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/cynosureLogEntry"
},
"title": "Entries of the log as per the request"
},
"count": {
"type": "string",
"format": "int64",
"description": "Count is the total number of log entries over the life of the process."
},
"continue": {
"type": "string",
"description": "Continue can be provided as ` + "`LogRequest.Since`" + ` value to subsequent requests for log tailing."
}
},
"description": "LogsResponse is the output supplied by the ` + "`Logs`" + ` API endpoint."
},
"cynosureProcess": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Identifier is the unique ID that is assigned to this instance of the command."
},
"namespace": {
"type": "string",
"description": "Namespace that the process is running in."
},
"pid": {
"type": "integer",
"format": "int32",
"description": "Pid is the process ID of the command."
},
"started": {
"type": "string",
"format": "int64",
"description": "Started time in milliseconds since epoch that the current PID started."
},
"running": {
"type": "string",
"format": "int64",
"description": "Running duration in milliseconds that the process has been running."
},
"ready": {
"type": "boolean",
"format": "boolean",
"description": "Ready is whether the process thinks it's ready (determined by watches on start)."
},
"command": {
"$ref": "#/definitions/cynosureCommand",
"title": "Command to run (or that is running)"
},
"ports": {
"type": "array",
"items": {
"type": "string"
},
"description": "Ports that are open (TCP/UDP for listening) by the process."
},
"observations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Observations that have been made by the ` + "`StartRequest.Watches`" + ` (which are supplied at start-up)."
}
},
"description": "Process information to create a new process or return from a running process."
},
"cynosureRunningRequest": {
"type": "object",
"properties": {
"filters": {
"type": "array",
"items": {
"$ref": "#/definitions/cynosureFilter"
},
"description": "Filters allow limiting the processes returned by this call (default = all)."
}
},
"description": "RunningRequest is the input supplied to the ` + "`Running`" + ` API endpoint."
},
"cynosureRunningResponse": {
"type": "object",
"properties": {
"processes": {
"type": "array",
"items": {
"$ref": "#/definitions/cynosureProcess"
},
"description": "Processes contains the running processes that matched the request ` + "`Filter`" + `."
}
},
"description": "RunningResponse is the output supplied by the ` + "`Running`" + ` API endpoint."
},
"cynosureStartResponse": {
"type": "object",
"properties": {
"process": {
"$ref": "#/definitions/cynosureProcess",
"description": "Process contains the details of the process that was started."
}
},
"description": "StartResponse is the output supplied by the ` + "`Start`" + ` API endpoint."
},
"cynosureStopResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"format": "boolean",
"description": "Success of the stop request."
}
},
"description": "StopResponse is the output supplied by the ` + "`Stop`" + ` API endpoint."
},
"cynosureWatch": {
"type": "object",
"properties": {
"match": {
"type": "string",
"description": "Match is a string to find in the output that triggers this watch."
},
"state": {
"$ref": "#/definitions/WatchState",
"description": "State determines whether this match will make the app ready, not, or do nothing."
}
},
"description": "Watch items enable observation of log lines and keep track of running state."
}
},
"externalDocs": {
"description": "Cynosure GitHub repository",
"url": "https://github.com/norganna/cynosure"
}
}
`
)
Variables ¶
var Filter_Op_name = map[int32]string{
0: "In",
1: "NotIn",
}
var Filter_Op_value = map[string]int32{
"In": 0,
"NotIn": 1,
}
var Filter_Type_name = map[int32]string{
0: "Namespace",
1: "Label",
}
var Filter_Type_value = map[string]int32{
"Namespace": 0,
"Label": 1,
}
var Watch_State_name = map[int32]string{
0: "Unchanged",
1: "MakeReady",
2: "NotReady",
}
var Watch_State_value = map[string]int32{
"Unchanged": 0,
"MakeReady": 1,
"NotReady": 2,
}
Functions ¶
func RegisterAPIHandler ¶
RegisterAPIHandler registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAPIHandlerClient ¶
RegisterAPIHandlerClient registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "APIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "APIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "APIClient" to call the correct interceptors.
func RegisterAPIHandlerFromEndpoint ¶
func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAPIHandlerFromEndpoint is same as RegisterAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAPIServer ¶
Types ¶
type APIClient ¶
type APIClient interface { // Running will “`return“` a list of running processes that match the requested filter (or all). Running(ctx context.Context, in *RunningRequest, opts ...grpc.CallOption) (*RunningResponse, error) // Info provides information about a specific process. Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) // Logs returns log lines from the specified process. Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (*LogsResponse, error) // Start creates a new process from the given request. Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) // Stop terminates a specified process. Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) // Environment allows setting default environment values for all processes started in the specified namespace. Environment(ctx context.Context, in *EnvironmentRequest, opts ...grpc.CallOption) (*EnvironmentResponse, error) Image(ctx context.Context, in *ImageRequest, opts ...grpc.CallOption) (*ImageResponse, error) }
APIClient is the client API for API service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAPIClient ¶
func NewAPIClient(cc *grpc.ClientConn) APIClient
type APIServer ¶
type APIServer interface { // Running will “`return“` a list of running processes that match the requested filter (or all). Running(context.Context, *RunningRequest) (*RunningResponse, error) // Info provides information about a specific process. Info(context.Context, *InfoRequest) (*InfoResponse, error) // Logs returns log lines from the specified process. Logs(context.Context, *LogsRequest) (*LogsResponse, error) // Start creates a new process from the given request. Start(context.Context, *StartRequest) (*StartResponse, error) // Stop terminates a specified process. Stop(context.Context, *StopRequest) (*StopResponse, error) // Environment allows setting default environment values for all processes started in the specified namespace. Environment(context.Context, *EnvironmentRequest) (*EnvironmentResponse, error) Image(context.Context, *ImageRequest) (*ImageResponse, error) }
APIServer is the server API for API service.
type Command ¶
type Command struct { // Name will be used as the prefix for the identifier. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Image is the uploaded image file to use as the filesystem. Image string `protobuf:"bytes,10,opt,name=image,proto3" json:"image,omitempty"` // Entry is the command to execute as the entry-point. Entry string `protobuf:"bytes,11,opt,name=entry,proto3" json:"entry,omitempty"` // Args are supplied to the executable. Args []string `protobuf:"bytes,12,rep,name=args,proto3" json:"args,omitempty"` // Env provides extra environment variables. Env []string `protobuf:"bytes,13,rep,name=env,proto3" json:"env,omitempty"` // Requirements is a set of dependencies to be met before the command will be run. Requirements map[string]*Deps `` /* 166-byte string literal not displayed */ // Lines is the number of log entries that have been produced (read-only). Lines int64 `protobuf:"varint,50,opt,name=lines,proto3" json:"lines,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Command contains command information used to start a process and return information about a running command.
func (*Command) Descriptor ¶
func (*Command) GetRequirements ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) XXX_DiscardUnknown ¶
func (m *Command) XXX_DiscardUnknown()
func (*Command) XXX_Marshal ¶
func (*Command) XXX_Unmarshal ¶
type Dep ¶
type Dep struct { // Identity of the broker to use, defined within the server configuration. Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // Wait is the thing to wait for, how it is interpreted/found is up to the provider. Wait string `protobuf:"bytes,10,opt,name=wait,proto3" json:"wait,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Dep contains dependency requirements.
func (*Dep) Descriptor ¶
func (*Dep) GetIdentity ¶
func (*Dep) ProtoMessage ¶
func (*Dep) ProtoMessage()
func (*Dep) XXX_DiscardUnknown ¶
func (m *Dep) XXX_DiscardUnknown()
func (*Dep) XXX_Unmarshal ¶
type Deps ¶
type Deps struct { // Deps is the list of `Dep` items. Deps []*Dep `protobuf:"bytes,1,rep,name=deps,proto3" json:"deps,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Deps is a list of Dep entries, any of which can fulfil the requirement.
func (*Deps) Descriptor ¶
func (*Deps) ProtoMessage ¶
func (*Deps) ProtoMessage()
func (*Deps) XXX_DiscardUnknown ¶
func (m *Deps) XXX_DiscardUnknown()
func (*Deps) XXX_Unmarshal ¶
type EnvironmentRequest ¶
type EnvironmentRequest struct { // Name of the environment. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Values to provide for the namespace (`key=value`). Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EnvironmentRequest is the input supplied to the `Environment` API endpoint.
func (*EnvironmentRequest) Descriptor ¶
func (*EnvironmentRequest) Descriptor() ([]byte, []int)
func (*EnvironmentRequest) GetName ¶
func (m *EnvironmentRequest) GetName() string
func (*EnvironmentRequest) GetValues ¶
func (m *EnvironmentRequest) GetValues() []string
func (*EnvironmentRequest) ProtoMessage ¶
func (*EnvironmentRequest) ProtoMessage()
func (*EnvironmentRequest) Reset ¶
func (m *EnvironmentRequest) Reset()
func (*EnvironmentRequest) String ¶
func (m *EnvironmentRequest) String() string
func (*EnvironmentRequest) XXX_DiscardUnknown ¶
func (m *EnvironmentRequest) XXX_DiscardUnknown()
func (*EnvironmentRequest) XXX_Marshal ¶
func (m *EnvironmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EnvironmentRequest) XXX_Merge ¶
func (m *EnvironmentRequest) XXX_Merge(src proto.Message)
func (*EnvironmentRequest) XXX_Size ¶
func (m *EnvironmentRequest) XXX_Size() int
func (*EnvironmentRequest) XXX_Unmarshal ¶
func (m *EnvironmentRequest) XXX_Unmarshal(b []byte) error
type EnvironmentResponse ¶
type EnvironmentResponse struct { // Success of the environment request. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EnvironmentResponse is the output supplied by the `Environment` API endpoint.
func (*EnvironmentResponse) Descriptor ¶
func (*EnvironmentResponse) Descriptor() ([]byte, []int)
func (*EnvironmentResponse) GetSuccess ¶
func (m *EnvironmentResponse) GetSuccess() bool
func (*EnvironmentResponse) ProtoMessage ¶
func (*EnvironmentResponse) ProtoMessage()
func (*EnvironmentResponse) Reset ¶
func (m *EnvironmentResponse) Reset()
func (*EnvironmentResponse) String ¶
func (m *EnvironmentResponse) String() string
func (*EnvironmentResponse) XXX_DiscardUnknown ¶
func (m *EnvironmentResponse) XXX_DiscardUnknown()
func (*EnvironmentResponse) XXX_Marshal ¶
func (m *EnvironmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EnvironmentResponse) XXX_Merge ¶
func (m *EnvironmentResponse) XXX_Merge(src proto.Message)
func (*EnvironmentResponse) XXX_Size ¶
func (m *EnvironmentResponse) XXX_Size() int
func (*EnvironmentResponse) XXX_Unmarshal ¶
func (m *EnvironmentResponse) XXX_Unmarshal(b []byte) error
type Filter ¶
type Filter struct { // Type of value to filter on. Type Filter_Type `protobuf:"varint,1,opt,name=type,proto3,enum=cynosure.Filter_Type" json:"type,omitempty"` // Op is the matching type. Op Filter_Op `protobuf:"varint,2,opt,name=op,proto3,enum=cynosure.Filter_Op" json:"op,omitempty"` // Values to match. Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Key to match on (type dependant). Key string `protobuf:"bytes,10,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Filter expresses how to match a `Process`.
func (*Filter) Descriptor ¶
func (*Filter) GetType ¶
func (m *Filter) GetType() Filter_Type
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type Filter_Type ¶
type Filter_Type int32
Type is the kind of thing to match on.
const ( // Namespace matches on the namespace of the process. Filter_Namespace Filter_Type = 0 // Label matches on a label used to start a process (requires a `Filter.Key`). Filter_Label Filter_Type = 1 )
func (Filter_Type) EnumDescriptor ¶
func (Filter_Type) EnumDescriptor() ([]byte, []int)
func (Filter_Type) String ¶
func (x Filter_Type) String() string
type ImageRequest ¶
type ImageRequest struct { // Identity of this image. Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // Image data (a tar.gz of the file system), if supplied creates the stored image. Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ImageRequest is the input supplied to the `Image` API endpoint.
func (*ImageRequest) Descriptor ¶
func (*ImageRequest) Descriptor() ([]byte, []int)
func (*ImageRequest) GetIdentity ¶
func (m *ImageRequest) GetIdentity() string
func (*ImageRequest) GetImage ¶
func (m *ImageRequest) GetImage() []byte
func (*ImageRequest) ProtoMessage ¶
func (*ImageRequest) ProtoMessage()
func (*ImageRequest) Reset ¶
func (m *ImageRequest) Reset()
func (*ImageRequest) String ¶
func (m *ImageRequest) String() string
func (*ImageRequest) XXX_DiscardUnknown ¶
func (m *ImageRequest) XXX_DiscardUnknown()
func (*ImageRequest) XXX_Marshal ¶
func (m *ImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ImageRequest) XXX_Merge ¶
func (m *ImageRequest) XXX_Merge(src proto.Message)
func (*ImageRequest) XXX_Size ¶
func (m *ImageRequest) XXX_Size() int
func (*ImageRequest) XXX_Unmarshal ¶
func (m *ImageRequest) XXX_Unmarshal(b []byte) error
type ImageResponse ¶
type ImageResponse struct { // Exists if the image exists in the system. Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` // Success if the image was created. Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ImageResponse is the output supplied by the `Image` API endpoint.
func (*ImageResponse) Descriptor ¶
func (*ImageResponse) Descriptor() ([]byte, []int)
func (*ImageResponse) GetExists ¶
func (m *ImageResponse) GetExists() bool
func (*ImageResponse) GetSuccess ¶
func (m *ImageResponse) GetSuccess() bool
func (*ImageResponse) ProtoMessage ¶
func (*ImageResponse) ProtoMessage()
func (*ImageResponse) Reset ¶
func (m *ImageResponse) Reset()
func (*ImageResponse) String ¶
func (m *ImageResponse) String() string
func (*ImageResponse) XXX_DiscardUnknown ¶
func (m *ImageResponse) XXX_DiscardUnknown()
func (*ImageResponse) XXX_Marshal ¶
func (m *ImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ImageResponse) XXX_Merge ¶
func (m *ImageResponse) XXX_Merge(src proto.Message)
func (*ImageResponse) XXX_Size ¶
func (m *ImageResponse) XXX_Size() int
func (*ImageResponse) XXX_Unmarshal ¶
func (m *ImageResponse) XXX_Unmarshal(b []byte) error
type InfoRequest ¶
type InfoRequest struct { // Identifier of the process that should be interrogated. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
InfoRequest is the input supplied to the `Info` API endpoint.
func (*InfoRequest) Descriptor ¶
func (*InfoRequest) Descriptor() ([]byte, []int)
func (*InfoRequest) GetIdentifier ¶
func (m *InfoRequest) GetIdentifier() string
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) Reset ¶
func (m *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (m *InfoRequest) String() string
func (*InfoRequest) XXX_DiscardUnknown ¶
func (m *InfoRequest) XXX_DiscardUnknown()
func (*InfoRequest) XXX_Marshal ¶
func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InfoRequest) XXX_Merge ¶
func (m *InfoRequest) XXX_Merge(src proto.Message)
func (*InfoRequest) XXX_Size ¶
func (m *InfoRequest) XXX_Size() int
func (*InfoRequest) XXX_Unmarshal ¶
func (m *InfoRequest) XXX_Unmarshal(b []byte) error
type InfoResponse ¶
type InfoResponse struct { // Process contains the running process that matched the identifier. Process *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
InfoResponse is the output supplied by the `Info` API endpoint.
func (*InfoResponse) Descriptor ¶
func (*InfoResponse) Descriptor() ([]byte, []int)
func (*InfoResponse) GetProcess ¶
func (m *InfoResponse) GetProcess() *Process
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) Reset ¶
func (m *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (m *InfoResponse) String() string
func (*InfoResponse) XXX_DiscardUnknown ¶
func (m *InfoResponse) XXX_DiscardUnknown()
func (*InfoResponse) XXX_Marshal ¶
func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InfoResponse) XXX_Merge ¶
func (m *InfoResponse) XXX_Merge(src proto.Message)
func (*InfoResponse) XXX_Size ¶
func (m *InfoResponse) XXX_Size() int
func (*InfoResponse) XXX_Unmarshal ¶
func (m *InfoResponse) XXX_Unmarshal(b []byte) error
type KV ¶
type KV struct { // Key of the value. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Value of the key. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
KV is a simple key/value pair.
func (*KV) Descriptor ¶
func (*KV) ProtoMessage ¶
func (*KV) ProtoMessage()
func (*KV) XXX_DiscardUnknown ¶
func (m *KV) XXX_DiscardUnknown()
func (*KV) XXX_Unmarshal ¶
type LogEntry ¶
type LogEntry struct { // Pos provides the line number for the log entry (starts at 1). Pos int64 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` // Time that the log entry was processed. Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` // Source of the log entry (`out`, `err`, `debug`, `info`, `warning`, `error`, `fatal`, etc). Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` // Raw contents of the log line. Raw string `protobuf:"bytes,4,opt,name=raw,proto3" json:"raw,omitempty"` // Message that was parsed out of the raw log line. Message string `protobuf:"bytes,10,opt,name=message,proto3" json:"message,omitempty"` // Fields that were parsed out of the raw log line. Fields string `protobuf:"bytes,11,opt,name=fields,proto3" json:"fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LogEntry of a log line from a process.
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetMessage ¶
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
func (*LogEntry) XXX_DiscardUnknown ¶
func (m *LogEntry) XXX_DiscardUnknown()
func (*LogEntry) XXX_Marshal ¶
func (*LogEntry) XXX_Unmarshal ¶
type LogsRequest ¶
type LogsRequest struct { // Identifier of the process to get the logs for. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // Head returns the top **N** log lines. Head int64 `protobuf:"varint,10,opt,name=head,proto3" json:"head,omitempty"` // Tail returns the bottom **N** log lines. Tail int64 `protobuf:"varint,11,opt,name=tail,proto3" json:"tail,omitempty"` // Since returns all log lines since the given UTC timestamp. // // Typically you will use the value from the previous `LogsResponse.Continue` field. Since string `protobuf:"bytes,12,opt,name=since,proto3" json:"since,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LogsRequest is the input supplied to the `Logs` API endpoint.
func (*LogsRequest) Descriptor ¶
func (*LogsRequest) Descriptor() ([]byte, []int)
func (*LogsRequest) GetHead ¶
func (m *LogsRequest) GetHead() int64
func (*LogsRequest) GetIdentifier ¶
func (m *LogsRequest) GetIdentifier() string
func (*LogsRequest) GetSince ¶
func (m *LogsRequest) GetSince() string
func (*LogsRequest) GetTail ¶
func (m *LogsRequest) GetTail() int64
func (*LogsRequest) ProtoMessage ¶
func (*LogsRequest) ProtoMessage()
func (*LogsRequest) Reset ¶
func (m *LogsRequest) Reset()
func (*LogsRequest) String ¶
func (m *LogsRequest) String() string
func (*LogsRequest) XXX_DiscardUnknown ¶
func (m *LogsRequest) XXX_DiscardUnknown()
func (*LogsRequest) XXX_Marshal ¶
func (m *LogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LogsRequest) XXX_Merge ¶
func (m *LogsRequest) XXX_Merge(src proto.Message)
func (*LogsRequest) XXX_Size ¶
func (m *LogsRequest) XXX_Size() int
func (*LogsRequest) XXX_Unmarshal ¶
func (m *LogsRequest) XXX_Unmarshal(b []byte) error
type LogsResponse ¶
type LogsResponse struct { // Entries of the log as per the request Entries []*LogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // Count is the total number of log entries over the life of the process. Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // Continue can be provided as `LogRequest.Since` value to subsequent requests for log tailing. Continue string `protobuf:"bytes,3,opt,name=continue,proto3" json:"continue,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LogsResponse is the output supplied by the `Logs` API endpoint.
func (*LogsResponse) Descriptor ¶
func (*LogsResponse) Descriptor() ([]byte, []int)
func (*LogsResponse) GetContinue ¶
func (m *LogsResponse) GetContinue() string
func (*LogsResponse) GetCount ¶
func (m *LogsResponse) GetCount() int64
func (*LogsResponse) GetEntries ¶
func (m *LogsResponse) GetEntries() []*LogEntry
func (*LogsResponse) ProtoMessage ¶
func (*LogsResponse) ProtoMessage()
func (*LogsResponse) Reset ¶
func (m *LogsResponse) Reset()
func (*LogsResponse) String ¶
func (m *LogsResponse) String() string
func (*LogsResponse) XXX_DiscardUnknown ¶
func (m *LogsResponse) XXX_DiscardUnknown()
func (*LogsResponse) XXX_Marshal ¶
func (m *LogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LogsResponse) XXX_Merge ¶
func (m *LogsResponse) XXX_Merge(src proto.Message)
func (*LogsResponse) XXX_Size ¶
func (m *LogsResponse) XXX_Size() int
func (*LogsResponse) XXX_Unmarshal ¶
func (m *LogsResponse) XXX_Unmarshal(b []byte) error
type Process ¶
type Process struct { // Identifier is the unique ID that is assigned to this instance of the command. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // Namespace that the process is running in. Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // Pid is the process ID of the command. Pid int32 `protobuf:"varint,10,opt,name=pid,proto3" json:"pid,omitempty"` // Started time in milliseconds since epoch that the current PID started. Started int64 `protobuf:"varint,11,opt,name=started,proto3" json:"started,omitempty"` // Running duration in milliseconds that the process has been running. Running int64 `protobuf:"varint,12,opt,name=running,proto3" json:"running,omitempty"` // Ready is whether the process thinks it's ready (determined by watches on start). Ready bool `protobuf:"varint,13,opt,name=ready,proto3" json:"ready,omitempty"` // Command to run (or that is running) Command *Command `protobuf:"bytes,20,opt,name=command,proto3" json:"command,omitempty"` // Ports that are open (TCP/UDP for listening) by the process. Ports []string `protobuf:"bytes,21,rep,name=ports,proto3" json:"ports,omitempty"` // Observations that have been made by the `StartRequest.Watches` (which are supplied at start-up). Observations map[string]string `` /* 166-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Process information to create a new process or return from a running process.
func (*Process) Descriptor ¶
func (*Process) GetCommand ¶
func (*Process) GetIdentifier ¶
func (*Process) GetNamespace ¶
func (*Process) GetObservations ¶
func (*Process) GetRunning ¶
func (*Process) GetStarted ¶
func (*Process) ProtoMessage ¶
func (*Process) ProtoMessage()
func (*Process) XXX_DiscardUnknown ¶
func (m *Process) XXX_DiscardUnknown()
func (*Process) XXX_Marshal ¶
func (*Process) XXX_Unmarshal ¶
type RunningRequest ¶
type RunningRequest struct { // Filters allow limiting the processes returned by this call (default = all). Filters []*Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RunningRequest is the input supplied to the `Running` API endpoint.
func (*RunningRequest) Descriptor ¶
func (*RunningRequest) Descriptor() ([]byte, []int)
func (*RunningRequest) GetFilters ¶
func (m *RunningRequest) GetFilters() []*Filter
func (*RunningRequest) ProtoMessage ¶
func (*RunningRequest) ProtoMessage()
func (*RunningRequest) Reset ¶
func (m *RunningRequest) Reset()
func (*RunningRequest) String ¶
func (m *RunningRequest) String() string
func (*RunningRequest) XXX_DiscardUnknown ¶
func (m *RunningRequest) XXX_DiscardUnknown()
func (*RunningRequest) XXX_Marshal ¶
func (m *RunningRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RunningRequest) XXX_Merge ¶
func (m *RunningRequest) XXX_Merge(src proto.Message)
func (*RunningRequest) XXX_Size ¶
func (m *RunningRequest) XXX_Size() int
func (*RunningRequest) XXX_Unmarshal ¶
func (m *RunningRequest) XXX_Unmarshal(b []byte) error
type RunningResponse ¶
type RunningResponse struct { // Processes contains the running processes that matched the request `Filter`. Processes []*Process `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RunningResponse is the output supplied by the `Running` API endpoint.
func (*RunningResponse) Descriptor ¶
func (*RunningResponse) Descriptor() ([]byte, []int)
func (*RunningResponse) GetProcesses ¶
func (m *RunningResponse) GetProcesses() []*Process
func (*RunningResponse) ProtoMessage ¶
func (*RunningResponse) ProtoMessage()
func (*RunningResponse) Reset ¶
func (m *RunningResponse) Reset()
func (*RunningResponse) String ¶
func (m *RunningResponse) String() string
func (*RunningResponse) XXX_DiscardUnknown ¶
func (m *RunningResponse) XXX_DiscardUnknown()
func (*RunningResponse) XXX_Marshal ¶
func (m *RunningResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RunningResponse) XXX_Merge ¶
func (m *RunningResponse) XXX_Merge(src proto.Message)
func (*RunningResponse) XXX_Size ¶
func (m *RunningResponse) XXX_Size() int
func (*RunningResponse) XXX_Unmarshal ¶
func (m *RunningResponse) XXX_Unmarshal(b []byte) error
type StartRequest ¶
type StartRequest struct { // Command to run. Command *Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // Namespace to run the command in. Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // Labels to assign to the process (allows filtering of processes). Labels []*KV `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // Environments to run the command in (stacks environment variables). Environments []string `protobuf:"bytes,5,rep,name=environments,proto3" json:"environments,omitempty"` // Watches allow observation of key log entries and changing the process ready state. Watches map[string]*Watch `` /* 156-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StartRequest is the input supplied to the `Start` API endpoint.
func (*StartRequest) Descriptor ¶
func (*StartRequest) Descriptor() ([]byte, []int)
func (*StartRequest) GetCommand ¶
func (m *StartRequest) GetCommand() *Command
func (*StartRequest) GetEnvironments ¶
func (m *StartRequest) GetEnvironments() []string
func (*StartRequest) GetLabels ¶
func (m *StartRequest) GetLabels() []*KV
func (*StartRequest) GetNamespace ¶
func (m *StartRequest) GetNamespace() string
func (*StartRequest) GetWatches ¶
func (m *StartRequest) GetWatches() map[string]*Watch
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) Reset ¶
func (m *StartRequest) Reset()
func (*StartRequest) String ¶
func (m *StartRequest) String() string
func (*StartRequest) XXX_DiscardUnknown ¶
func (m *StartRequest) XXX_DiscardUnknown()
func (*StartRequest) XXX_Marshal ¶
func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StartRequest) XXX_Merge ¶
func (m *StartRequest) XXX_Merge(src proto.Message)
func (*StartRequest) XXX_Size ¶
func (m *StartRequest) XXX_Size() int
func (*StartRequest) XXX_Unmarshal ¶
func (m *StartRequest) XXX_Unmarshal(b []byte) error
type StartResponse ¶
type StartResponse struct { // Process contains the details of the process that was started. Process *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StartResponse is the output supplied by the `Start` API endpoint.
func (*StartResponse) Descriptor ¶
func (*StartResponse) Descriptor() ([]byte, []int)
func (*StartResponse) GetProcess ¶
func (m *StartResponse) GetProcess() *Process
func (*StartResponse) ProtoMessage ¶
func (*StartResponse) ProtoMessage()
func (*StartResponse) Reset ¶
func (m *StartResponse) Reset()
func (*StartResponse) String ¶
func (m *StartResponse) String() string
func (*StartResponse) XXX_DiscardUnknown ¶
func (m *StartResponse) XXX_DiscardUnknown()
func (*StartResponse) XXX_Marshal ¶
func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StartResponse) XXX_Merge ¶
func (m *StartResponse) XXX_Merge(src proto.Message)
func (*StartResponse) XXX_Size ¶
func (m *StartResponse) XXX_Size() int
func (*StartResponse) XXX_Unmarshal ¶
func (m *StartResponse) XXX_Unmarshal(b []byte) error
type StopRequest ¶
type StopRequest struct { // Identifier of the process to terminate. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StopRequest is the input supplied to the `Stop` API endpoint.
func (*StopRequest) Descriptor ¶
func (*StopRequest) Descriptor() ([]byte, []int)
func (*StopRequest) GetIdentifier ¶
func (m *StopRequest) GetIdentifier() string
func (*StopRequest) ProtoMessage ¶
func (*StopRequest) ProtoMessage()
func (*StopRequest) Reset ¶
func (m *StopRequest) Reset()
func (*StopRequest) String ¶
func (m *StopRequest) String() string
func (*StopRequest) XXX_DiscardUnknown ¶
func (m *StopRequest) XXX_DiscardUnknown()
func (*StopRequest) XXX_Marshal ¶
func (m *StopRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StopRequest) XXX_Merge ¶
func (m *StopRequest) XXX_Merge(src proto.Message)
func (*StopRequest) XXX_Size ¶
func (m *StopRequest) XXX_Size() int
func (*StopRequest) XXX_Unmarshal ¶
func (m *StopRequest) XXX_Unmarshal(b []byte) error
type StopResponse ¶
type StopResponse struct { // Success of the stop request. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
StopResponse is the output supplied by the `Stop` API endpoint.
func (*StopResponse) Descriptor ¶
func (*StopResponse) Descriptor() ([]byte, []int)
func (*StopResponse) GetSuccess ¶
func (m *StopResponse) GetSuccess() bool
func (*StopResponse) ProtoMessage ¶
func (*StopResponse) ProtoMessage()
func (*StopResponse) Reset ¶
func (m *StopResponse) Reset()
func (*StopResponse) String ¶
func (m *StopResponse) String() string
func (*StopResponse) XXX_DiscardUnknown ¶
func (m *StopResponse) XXX_DiscardUnknown()
func (*StopResponse) XXX_Marshal ¶
func (m *StopResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StopResponse) XXX_Merge ¶
func (m *StopResponse) XXX_Merge(src proto.Message)
func (*StopResponse) XXX_Size ¶
func (m *StopResponse) XXX_Size() int
func (*StopResponse) XXX_Unmarshal ¶
func (m *StopResponse) XXX_Unmarshal(b []byte) error
type UnimplementedAPIServer ¶
type UnimplementedAPIServer struct { }
UnimplementedAPIServer can be embedded to have forward compatible implementations.
func (*UnimplementedAPIServer) Environment ¶
func (*UnimplementedAPIServer) Environment(ctx context.Context, req *EnvironmentRequest) (*EnvironmentResponse, error)
func (*UnimplementedAPIServer) Image ¶
func (*UnimplementedAPIServer) Image(ctx context.Context, req *ImageRequest) (*ImageResponse, error)
func (*UnimplementedAPIServer) Info ¶
func (*UnimplementedAPIServer) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error)
func (*UnimplementedAPIServer) Logs ¶
func (*UnimplementedAPIServer) Logs(ctx context.Context, req *LogsRequest) (*LogsResponse, error)
func (*UnimplementedAPIServer) Running ¶
func (*UnimplementedAPIServer) Running(ctx context.Context, req *RunningRequest) (*RunningResponse, error)
func (*UnimplementedAPIServer) Start ¶
func (*UnimplementedAPIServer) Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
func (*UnimplementedAPIServer) Stop ¶
func (*UnimplementedAPIServer) Stop(ctx context.Context, req *StopRequest) (*StopResponse, error)
type Watch ¶
type Watch struct { // Match is a string to find in the output that triggers this watch. Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` // State determines whether this match will make the app ready, not, or do nothing. State Watch_State `protobuf:"varint,2,opt,name=state,proto3,enum=cynosure.Watch_State" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Watch items enable observation of log lines and keep track of running state.
func (*Watch) Descriptor ¶
func (*Watch) GetState ¶
func (m *Watch) GetState() Watch_State
func (*Watch) ProtoMessage ¶
func (*Watch) ProtoMessage()
func (*Watch) XXX_DiscardUnknown ¶
func (m *Watch) XXX_DiscardUnknown()
func (*Watch) XXX_Marshal ¶
func (*Watch) XXX_Unmarshal ¶
type Watch_State ¶
type Watch_State int32
State changes.
const ( // Unchanged does not change the state of the process (default). Watch_Unchanged Watch_State = 0 // MakeReady changes the process state to ready, if not currently not-ready. Watch_MakeReady Watch_State = 1 // NotReady changes the process state to not-ready, if currently ready. Watch_NotReady Watch_State = 2 )
func (Watch_State) EnumDescriptor ¶
func (Watch_State) EnumDescriptor() ([]byte, []int)
func (Watch_State) String ¶
func (x Watch_State) String() string