Documentation
¶
Index ¶
- Constants
- Variables
- func Blake2b32(x string) string
- func CaseInsensitiveGet(m map[string]string, k string) (string, bool)
- func Exec(ctx context.Context, args *Args) (int, error)
- func RandKey() string
- func Tail(ctx context.Context, tailArgs *TailArgs) (int, error)
- type Args
- type AsyncEvent
- type GetRequest
- type GetResponse
- type PostRequest
- type PostResponse
- type PullKeys
- type PushUrls
- type Record
- type RecordData
- type RecordKey
- type TailArgs
Constants ¶
View Source
const ( EventExec = "exec" MaxLogBytes = 1024 * 1024 * 32 // reasonably upper bound to write to s3 from 128mb lambda LogShipInterval = 1 * time.Second )
Variables ¶
View Source
var Rpc = map[string]rpcFunc{}
Functions ¶
func Exec ¶
if pushUrls are not provided, data will be persisted by aws-exec and this function will poll until process completion, pulling log data as it is available and invoking logDataCallback, then returning the exit code.
if pushUrls are provided, data will be persisted at those urls via http put with content-length set, and this function will return immediately. urls should remain valid for 20 minutes. log will be pushed repeatedly with the entire log contents. exit will be pushed once and will contain the exit code. size will be pushed once, will be pushed last, and will contain the size of the final log push.
Types ¶
type AsyncEvent ¶
type AsyncEvent struct { EventType string `json:"event-type"` AuthName string `json:"auth-name"` Uid string `json:"uid"` PushUrls *PushUrls `json:"push-urls"` // to invoke subprocess, provide argv. this is slower. Argv []string `json:"argv"` // to invoke rpc, provide name and args. this is faster. RpcName string `json:"rpc-name"` RpcArgs string `json:"rpc-args"` }
type GetRequest ¶
type GetResponse ¶
type PostRequest ¶
type PostResponse ¶
type PostResponse struct {
Uid string `json:"uid"`
}
type PushUrls ¶
type PushUrls struct { Log string `json:"log"` Size string `json:"size"` Exit string `json:"exit"` }
s3 presigned put urls
type Record ¶
type Record struct { RecordKey RecordData }
type RecordData ¶
type RecordData struct {
Value string `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.