From 127057ce0bce536b9f7667c399de8eeb1e31a6dc Mon Sep 17 00:00:00 2001 From: IllTamer <78360471+IllTamer@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:24:46 +0800 Subject: [PATCH] feat: update entry --- go.mod | 4 +- go.sum | 89 +- internal/entry/entry.go | 40 + internal/entry/entry_test.go | 11 + internal/entry/init.go | 26 + internal/entry/parser.go | 44 + main.go | 43 +- output | 5589 ---------------------------------- 8 files changed, 218 insertions(+), 5628 deletions(-) create mode 100644 internal/entry/entry.go create mode 100644 internal/entry/entry_test.go create mode 100644 internal/entry/init.go create mode 100644 internal/entry/parser.go delete mode 100644 output diff --git a/go.mod b/go.mod index 0d3ac8c..fc2c962 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,10 @@ module github.com/IUnlimit/sample-sls go 1.21.4 +require github.com/apache/beam/sdks/v2 v2.54.0 + require ( - github.com/apache/beam/sdks/v2 v2.54.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect diff --git a/go.sum b/go.sum index 212bd3f..77d17df 100644 --- a/go.sum +++ b/go.sum @@ -1,27 +1,112 @@ +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/profiler v0.4.0 h1:ZeRDZbsOBDyRG0OiK0Op1/XWZ3xeLwJc9zjkzczUxyY= +cloud.google.com/go/profiler v0.4.0/go.mod h1:RvPlm4dilIr3oJtAOeFQU9Lrt5RoySHSDj4pTd6TWeU= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/apache/beam/sdks/v2 v2.54.0 h1:6U90JC2I5nGujFftlzeNVQj0Of2fFsh0XGoEoIIxxpE= github.com/apache/beam/sdks/v2 v2.54.0/go.mod h1:RDJaFmaAoIIM+VbM9OfqH4RauR+5BW5XdwR/dsJ13pI= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/frankban/quicktest v1.2.2 h1:xfmOhhoH5fGPgbEAlhLpJH9p0z/0Qizio9osmvn9IUY= github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= -github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4= -github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= +github.com/google/pprof v0.0.0-20230602150820-91b7bce49751/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/rogpeppe/clock v0.0.0-20190514195947-2896927a307a h1:3QH7VyOaaiUHNrA9Se4YQIRkDTCw1EJls9xTUCaCeRM= github.com/rogpeppe/clock v0.0.0-20190514195947-2896927a307a/go.mod h1:4r5QyqhjIWCcK8DO4KMclc5Iknq5qVBAlbYYzAbUScQ= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.154.0 h1:X7QkVKZBskztmpPKWQXgjJRPA2dJYrL6r+sYPRLj050= +google.golang.org/api v0.154.0/go.mod h1:qhSMkM85hgqiokIYsrRyKxrjfBeIhgl4Z2JmeRkYylc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= diff --git a/internal/entry/entry.go b/internal/entry/entry.go new file mode 100644 index 0000000..4fe0925 --- /dev/null +++ b/internal/entry/entry.go @@ -0,0 +1,40 @@ +package entry + +import "regexp" + +const ( + DateTimeLayout = `2006-01-02 15:04:05` + DateTimePattern = `\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}` + IPv4Pattern = `(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)` + IPv6Pattern = `(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}(?:[0-9A-Fa-f]{1,4}|:))|(?:(?:[0-9A-Fa-f]{1,4}:){6}(?::[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9A-Fa-f]{1,4}:){5}(?:(?:(?::[0-9A-Fa-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9A-Fa-f]{1,4}:){4}(?:(?:(?::[0-9A-Fa-f]{1,4}){1,3})|(?:(?::[0-9A-Fa-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9A-Fa-f]{1,4}:){3}(?:(?:(?::[0-9A-Fa-f]{1,4}){1,4})|(?:(?::[0-9A-Fa-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9A-Fa-f]{1,4}:){2}(?:(?:(?::[0-9A-Fa-f]{1,4}){1,5})|(?:(?::[0-9A-Fa-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9A-Fa-f]{1,4}:){1}(?:(?:(?::[0-9A-Fa-f]{1,4}){1,6})|(?:(?::[0-9A-Fa-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9A-Fa-f]{1,4}){1,7})|(?:(?::[0-9A-Fa-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*` + IPPattern = IPv4Pattern + `|` + IPv6Pattern +) + +var ( + DateTimeRegex = regexp.MustCompile(DateTimePattern) + IPv4Regex = regexp.MustCompile(IPv4Pattern) + IPv6Regex = regexp.MustCompile(IPv6Pattern) + IPRegex = regexp.MustCompile(IPPattern) +) + +// LogEntry log meta data +type LogEntry struct { + // log Source 127.0.0.1 + Source string `json:"__source__"` + Tag *Tag `json:"__tag__"` + Topic *Topic `json:"__topic__"` +} + +// Tag log tag +type Tag struct { + // Hostname iunlimit + Hostname string `json:"__hostname__,omitempty"` + // log storage Path /var/log/exec/file.log + Path string `json:"__path__,omitempty"` +} + +// Topic log topic +type Topic struct { + // log Content (with `Event Time`) + Content string `json:"content"` +} diff --git a/internal/entry/entry_test.go b/internal/entry/entry_test.go new file mode 100644 index 0000000..4db0af7 --- /dev/null +++ b/internal/entry/entry_test.go @@ -0,0 +1,11 @@ +package entry + +import ( + "fmt" + "testing" +) + +func Test_Regx(t *testing.T) { + content := "[PERP] [DEBUG] [2024-03-19 18:00:20]: Wait NTQQ startup: dial tcp 127.0.0.1:8000: connect: connection refused" + fmt.Println(DateTimeRegex.FindString(content)) +} diff --git a/internal/entry/init.go b/internal/entry/init.go new file mode 100644 index 0000000..d4966a0 --- /dev/null +++ b/internal/entry/init.go @@ -0,0 +1,26 @@ +package entry + +import ( + "github.com/apache/beam/sdks/v2/go/pkg/beam" + "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/mtime" +) + +func Init() { + parser = NewDateTimeRegexParser() +} + +// ParseLogEntryDoFn parse log str to LogEntry +func ParseLogEntryDoFn(element string, emit func(*LogEntry)) { + entry := &LogEntry{Topic: &Topic{Content: element}} + emit(entry) +} + +// AddTimestampDoFn extracts an event time from a LogEntry. +func AddTimestampDoFn(element *LogEntry, emit func(beam.EventTime, *LogEntry)) error { + et, err := parser.extractEventTime(element) + if err != nil { + return err + } + emit(mtime.FromTime(*et), element) + return nil +} diff --git a/internal/entry/parser.go b/internal/entry/parser.go new file mode 100644 index 0000000..9f401ed --- /dev/null +++ b/internal/entry/parser.go @@ -0,0 +1,44 @@ +package entry + +import ( + "regexp" + "time" +) + +var parser *RegexParser + +type Parser interface { + extractEventTime(element LogEntry) time.Time +} + +type RegexParser struct { + // time string regex + regex *regexp.Regexp + // time parse layout + layout string +} + +func NewDateTimeRegexParser() *RegexParser { + return &RegexParser{ + regex: DateTimeRegex, + layout: DateTimeLayout, + } +} + +func NewCustomRegexParser(regx string) *RegexParser { + return &RegexParser{ + regex: regexp.MustCompile(regx), + } +} + +func (r *RegexParser) extractEventTime(entry *LogEntry) (*time.Time, error) { + content := entry.Topic.Content + if dateTime := r.regex.FindString(content); len(dateTime) != 0 { + timeObj, err := time.Parse(r.layout, dateTime) + if err != nil { + return nil, err + } + return &timeObj, nil + } + return nil, nil +} diff --git a/main.go b/main.go index 589ae4f..7fefaf5 100644 --- a/main.go +++ b/main.go @@ -3,11 +3,10 @@ package main import ( "context" "fmt" - "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/mtime" + "github.com/IUnlimit/sample-sls/internal/entry" "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/window" "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/window/trigger" _ "github.com/apache/beam/sdks/v2/go/pkg/beam/runners/direct" - "math/rand" "regexp" "strings" "time" @@ -17,23 +16,17 @@ import ( "github.com/apache/beam/sdks/v2/go/pkg/beam/io/textio" ) -type addTimestampFn struct { - Min beam.EventTime `json:"min"` -} - -func (f *addTimestampFn) ProcessElement(x beam.X) (beam.EventTime, beam.X) { - timestamp := f.Min.Add(time.Duration(rand.Int63n(1 * time.Hour.Nanoseconds()))) - return timestamp, x -} - func main() { beam.Init() + entry.Init() p, s := beam.NewPipelineWithRoot() - lines := textio.Read(s, "D:\\code\\go\\sample-sls\\README.md") - moreLines := textio.Read(s, "D:\\code\\go\\sample-sls\\LICENSE") + lines := textio.Read(s, "README.md") + moreLines := textio.Read(s, "LICENSE") all := beam.Flatten(s, lines, moreLines) - timestampedLines := beam.ParDo(s, &addTimestampFn{Min: mtime.Now()}, all) + + logEntries := beam.ParDo(s, entry.ParseLogEntryDoFn, all) + timestampedLines := beam.ParDo(s, entry.AddTimestampDoFn, logEntries) triggers := make([]trigger.Trigger, 0) triggers = append(triggers, trigger.AfterProcessingTime().PlusDelay(60*time.Second)) @@ -55,32 +48,12 @@ func main() { }, windowedLines) formatted := beam.ParDo(s, strings.ToUpper, words) - textio.Write(s, "D:\\code\\go\\sample-sls\\output", formatted) + textio.Write(s, "output/1.txt", formatted) if _, err := beam.Run(context.Background(), "direct", p); err != nil { fmt.Printf("Pipeline failed: %v", err) } } -// 从文件读取日志需要手动转换timestamp -// // AddTimestampDoFn extracts an event time from a LogEntry. -//func AddTimestampDoFn(element LogEntry, emit func(beam.EventTime, LogEntry)) { -// et := extractEventTime(element) -// // Defining an emitter with beam.EventTime as the first parameter -// // allows the DoFn to set the event time for the emitted element. -// emit(mtime.FromTime(et), element) -//} -// //// Use the DoFn with ParDo as normal. //stampedLogs := beam.ParDo(s, AddTimestampDoFn, unstampedLogs) - -// // 将数据分配到固定时间窗口,并设置每个窗口最大元素数量为 3 -// windowedData := beam.WindowInto(s, beam.NewGlobalWindows(), data) -// windowedData = beam.ParDo(s, func(i int) (beam.Window, int) { -// return beam.GlobalWindow{}, i -// }, windowedData) -// -// // 使用 Count 触发器来限制每个窗口的元素数量 -// triggeredData := beam.Trigger(windowedData, periodic.Trigger{ -// Trigger: periodic.CountTrigger{MaxElement: 3}, -// }) diff --git a/output b/output deleted file mode 100644 index 51e772c..0000000 --- a/output +++ /dev/null @@ -1,5589 +0,0 @@ -SAMPLE -SLS -SAMPLE -SLS -SAMPLE -SIMPLE -LOG -SERVICE -IS -A -STREAMING -LOG -ANALYSIS -PROJECT -THAT -APPLIES -THE -DATAFLOW -MODEL -IT -ADOPTS -THE -FRONT -END -AND -BACK -END -SEPARATION -ARCHITECTURE -OF -GO -VUE -AND -SUPPORTS -DISTRIBUTED -DEPLOYMENT -CHECK -POINTS -GOOGLE -DATAFLOW -DATA -DASHBOARD -LINKS -THE -DATAFLOW -MODEL -A -PRACTICAL -APPROACH -TO -BALANCING -CORRECTNESS -LATENCY -AND -COST -IN -MASSIVE -SCALE -UNBOUNDED -OUT -OF -ORDER -DATA -PROCESSING -HTTPS -RESEARCH -GOOGLE -COM -PUBS -ARCHIVE -PDF -THE -DATAFLOW -MODEL -HTTP -ILLTAMER -COM -DATAFLOW -MODEL -PAPER -CHINESE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -VERSION -NOVEMBER -COPYRIGHT -C -FREE -SOFTWARE -FOUNDATION -INC -HTTPS -FSF -ORG -EVERYONE -IS -PERMITTED -TO -COPY -AND -DISTRIBUTE -VERBATIM -COPIES -OF -THIS -LICENSE -DOCUMENT -BUT -CHANGING -IT -IS -NOT -ALLOWED -PREAMBLE -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -IS -A -FREE -COPYLEFT -LICENSE -FOR -SOFTWARE -AND -OTHER -KINDS -OF -WORKS -SPECIFICALLY -DESIGNED -TO -ENSURE -COOPERATION -WITH -THE -COMMUNITY -IN -THE -CASE -OF -NETWORK -SERVER -SOFTWARE -THE -LICENSES -FOR -MOST -SOFTWARE -AND -OTHER -PRACTICAL -WORKS -ARE -DESIGNED -TO -TAKE -AWAY -YOUR -FREEDOM -TO -SHARE -AND -CHANGE -THE -WORKS -BY -CONTRAST -OUR -GENERAL -PUBLIC -LICENSES -ARE -INTENDED -TO -GUARANTEE -YOUR -FREEDOM -TO -SHARE -AND -CHANGE -ALL -VERSIONS -OF -A -PROGRAM -TO -MAKE -SURE -IT -REMAINS -FREE -SOFTWARE -FOR -ALL -ITS -USERS -WHEN -WE -SPEAK -OF -FREE -SOFTWARE -WE -ARE -REFERRING -TO -FREEDOM -NOT -PRICE -OUR -GENERAL -PUBLIC -LICENSES -ARE -DESIGNED -TO -MAKE -SURE -THAT -YOU -HAVE -THE -FREEDOM -TO -DISTRIBUTE -COPIES -OF -FREE -SOFTWARE -AND -CHARGE -FOR -THEM -IF -YOU -WISH -THAT -YOU -RECEIVE -SOURCE -CODE -OR -CAN -GET -IT -IF -YOU -WANT -IT -THAT -YOU -CAN -CHANGE -THE -SOFTWARE -OR -USE -PIECES -OF -IT -IN -NEW -FREE -PROGRAMS -AND -THAT -YOU -KNOW -YOU -CAN -DO -THESE -THINGS -DEVELOPERS -THAT -USE -OUR -GENERAL -PUBLIC -LICENSES -PROTECT -YOUR -RIGHTS -WITH -TWO -STEPS -ASSERT -COPYRIGHT -ON -THE -SOFTWARE -AND -OFFER -YOU -THIS -LICENSE -WHICH -GIVES -YOU -LEGAL -PERMISSION -TO -COPY -DISTRIBUTE -AND -OR -MODIFY -THE -SOFTWARE -A -SECONDARY -BENEFIT -OF -DEFENDING -ALL -USERS -FREEDOM -IS -THAT -IMPROVEMENTS -MADE -IN -ALTERNATE -VERSIONS -OF -THE -PROGRAM -IF -THEY -RECEIVE -WIDESPREAD -USE -BECOME -AVAILABLE -FOR -OTHER -DEVELOPERS -TO -INCORPORATE -MANY -DEVELOPERS -OF -FREE -SOFTWARE -ARE -HEARTENED -AND -ENCOURAGED -BY -THE -RESULTING -COOPERATION -HOWEVER -IN -THE -CASE -OF -SOFTWARE -USED -ON -NETWORK -SERVERS -THIS -RESULT -MAY -FAIL -TO -COME -ABOUT -THE -GNU -GENERAL -PUBLIC -LICENSE -PERMITS -MAKING -A -MODIFIED -VERSION -AND -LETTING -THE -PUBLIC -ACCESS -IT -ON -A -SERVER -WITHOUT -EVER -RELEASING -ITS -SOURCE -CODE -TO -THE -PUBLIC -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -IS -DESIGNED -SPECIFICALLY -TO -ENSURE -THAT -IN -SUCH -CASES -THE -MODIFIED -SOURCE -CODE -BECOMES -AVAILABLE -TO -THE -COMMUNITY -IT -REQUIRES -THE -OPERATOR -OF -A -NETWORK -SERVER -TO -PROVIDE -THE -SOURCE -CODE -OF -THE -MODIFIED -VERSION -RUNNING -THERE -TO -THE -USERS -OF -THAT -SERVER -THEREFORE -PUBLIC -USE -OF -A -MODIFIED -VERSION -ON -A -PUBLICLY -ACCESSIBLE -SERVER -GIVES -THE -PUBLIC -ACCESS -TO -THE -SOURCE -CODE -OF -THE -MODIFIED -VERSION -AN -OLDER -LICENSE -CALLED -THE -AFFERO -GENERAL -PUBLIC -LICENSE -AND -PUBLISHED -BY -AFFERO -WAS -DESIGNED -TO -ACCOMPLISH -SIMILAR -GOALS -THIS -IS -A -DIFFERENT -LICENSE -NOT -A -VERSION -OF -THE -AFFERO -GPL -BUT -AFFERO -HAS -RELEASED -A -NEW -VERSION -OF -THE -AFFERO -GPL -WHICH -PERMITS -RELICENSING -UNDER -THIS -LICENSE -THE -PRECISE -TERMS -AND -CONDITIONS -FOR -COPYING -DISTRIBUTION -AND -MODIFICATION -FOLLOW -TERMS -AND -CONDITIONS -DEFINITIONS -THIS -LICENSE -REFERS -TO -VERSION -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -COPYRIGHT -ALSO -MEANS -COPYRIGHT -LIKE -LAWS -THAT -APPLY -TO -OTHER -KINDS -OF -WORKS -SUCH -AS -SEMICONDUCTOR -MASKS -THE -PROGRAM -REFERS -TO -ANY -COPYRIGHTABLE -WORK -LICENSED -UNDER -THIS -LICENSE -EACH -LICENSEE -IS -ADDRESSED -AS -YOU -LICENSEES -AND -RECIPIENTS -MAY -BE -INDIVIDUALS -OR -ORGANIZATIONS -TO -MODIFY -A -WORK -MEANS -TO -COPY -FROM -OR -ADAPT -ALL -OR -PART -OF -THE -WORK -IN -A -FASHION -REQUIRING -COPYRIGHT -PERMISSION -OTHER -THAN -THE -MAKING -OF -AN -EXACT -COPY -THE -RESULTING -WORK -IS -CALLED -A -MODIFIED -VERSION -OF -THE -EARLIER -WORK -OR -A -WORK -BASED -ON -THE -EARLIER -WORK -A -COVERED -WORK -MEANS -EITHER -THE -UNMODIFIED -PROGRAM -OR -A -WORK -BASED -ON -THE -PROGRAM -TO -PROPAGATE -A -WORK -MEANS -TO -DO -ANYTHING -WITH -IT -THAT -WITHOUT -PERMISSION -WOULD -MAKE -YOU -DIRECTLY -OR -SECONDARILY -LIABLE -FOR -INFRINGEMENT -UNDER -APPLICABLE -COPYRIGHT -LAW -EXCEPT -EXECUTING -IT -ON -A -COMPUTER -OR -MODIFYING -A -PRIVATE -COPY -PROPAGATION -INCLUDES -COPYING -DISTRIBUTION -WITH -OR -WITHOUT -MODIFICATION -MAKING -AVAILABLE -TO -THE -PUBLIC -AND -IN -SOME -COUNTRIES -OTHER -ACTIVITIES -AS -WELL -TO -CONVEY -A -WORK -MEANS -ANY -KIND -OF -PROPAGATION -THAT -ENABLES -OTHER -PARTIES -TO -MAKE -OR -RECEIVE -COPIES -MERE -INTERACTION -WITH -A -USER -THROUGH -A -COMPUTER -NETWORK -WITH -NO -TRANSFER -OF -A -COPY -IS -NOT -CONVEYING -AN -INTERACTIVE -USER -INTERFACE -DISPLAYS -APPROPRIATE -LEGAL -NOTICES -TO -THE -EXTENT -THAT -IT -INCLUDES -A -CONVENIENT -AND -PROMINENTLY -VISIBLE -FEATURE -THAT -DISPLAYS -AN -APPROPRIATE -COPYRIGHT -NOTICE -AND -TELLS -THE -USER -THAT -THERE -IS -NO -WARRANTY -FOR -THE -WORK -EXCEPT -TO -THE -EXTENT -THAT -WARRANTIES -ARE -PROVIDED -THAT -LICENSEES -MAY -CONVEY -THE -WORK -UNDER -THIS -LICENSE -AND -HOW -TO -VIEW -A -COPY -OF -THIS -LICENSE -IF -THE -INTERFACE -PRESENTS -A -LIST -OF -USER -COMMANDS -OR -OPTIONS -SUCH -AS -A -MENU -A -PROMINENT -ITEM -IN -THE -LIST -MEETS -THIS -CRITERION -SOURCE -CODE -THE -SOURCE -CODE -FOR -A -WORK -MEANS -THE -PREFERRED -FORM -OF -THE -WORK -FOR -MAKING -MODIFICATIONS -TO -IT -OBJECT -CODE -MEANS -ANY -NON -SOURCE -FORM -OF -A -WORK -A -STANDARD -INTERFACE -MEANS -AN -INTERFACE -THAT -EITHER -IS -AN -OFFICIAL -STANDARD -DEFINED -BY -A -RECOGNIZED -STANDARDS -BODY -OR -IN -THE -CASE -OF -INTERFACES -SPECIFIED -FOR -A -PARTICULAR -PROGRAMMING -LANGUAGE -ONE -THAT -IS -WIDELY -USED -AMONG -DEVELOPERS -WORKING -IN -THAT -LANGUAGE -THE -SYSTEM -LIBRARIES -OF -AN -EXECUTABLE -WORK -INCLUDE -ANYTHING -OTHER -THAN -THE -WORK -AS -A -WHOLE -THAT -A -IS -INCLUDED -IN -THE -NORMAL -FORM -OF -PACKAGING -A -MAJOR -COMPONENT -BUT -WHICH -IS -NOT -PART -OF -THAT -MAJOR -COMPONENT -AND -B -SERVES -ONLY -TO -ENABLE -USE -OF -THE -WORK -WITH -THAT -MAJOR -COMPONENT -OR -TO -IMPLEMENT -A -STANDARD -INTERFACE -FOR -WHICH -AN -IMPLEMENTATION -IS -AVAILABLE -TO -THE -PUBLIC -IN -SOURCE -CODE -FORM -A -MAJOR -COMPONENT -IN -THIS -CONTEXT -MEANS -A -MAJOR -ESSENTIAL -COMPONENT -KERNEL -WINDOW -SYSTEM -AND -SO -ON -OF -THE -SPECIFIC -OPERATING -SYSTEM -IF -ANY -ON -WHICH -THE -EXECUTABLE -WORK -RUNS -OR -A -COMPILER -USED -TO -PRODUCE -THE -WORK -OR -AN -OBJECT -CODE -INTERPRETER -USED -TO -RUN -IT -THE -CORRESPONDING -SOURCE -FOR -A -WORK -IN -OBJECT -CODE -FORM -MEANS -ALL -THE -SOURCE -CODE -NEEDED -TO -GENERATE -INSTALL -AND -FOR -AN -EXECUTABLE -WORK -RUN -THE -OBJECT -CODE -AND -TO -MODIFY -THE -WORK -INCLUDING -SCRIPTS -TO -CONTROL -THOSE -ACTIVITIES -HOWEVER -IT -DOES -NOT -INCLUDE -THE -WORK'S -SYSTEM -LIBRARIES -OR -GENERAL -PURPOSE -TOOLS -OR -GENERALLY -AVAILABLE -FREE -PROGRAMS -WHICH -ARE -USED -UNMODIFIED -IN -PERFORMING -THOSE -ACTIVITIES -BUT -WHICH -ARE -NOT -PART -OF -THE -WORK -FOR -EXAMPLE -CORRESPONDING -SOURCE -INCLUDES -INTERFACE -DEFINITION -FILES -ASSOCIATED -WITH -SOURCE -FILES -FOR -THE -WORK -AND -THE -SOURCE -CODE -FOR -SHARED -LIBRARIES -AND -DYNAMICALLY -LINKED -SUBPROGRAMS -THAT -THE -WORK -IS -SPECIFICALLY -DESIGNED -TO -REQUIRE -SUCH -AS -BY -INTIMATE -DATA -COMMUNICATION -OR -CONTROL -FLOW -BETWEEN -THOSE -SUBPROGRAMS -AND -OTHER -PARTS -OF -THE -WORK -THE -CORRESPONDING -SOURCE -NEED -NOT -INCLUDE -ANYTHING -THAT -USERS -CAN -REGENERATE -AUTOMATICALLY -FROM -OTHER -PARTS -OF -THE -CORRESPONDING -SOURCE -THE -CORRESPONDING -SOURCE -FOR -A -WORK -IN -SOURCE -CODE -FORM -IS -THAT -SAME -WORK -BASIC -PERMISSIONS -ALL -RIGHTS -GRANTED -UNDER -THIS -LICENSE -ARE -GRANTED -FOR -THE -TERM -OF -COPYRIGHT -ON -THE -PROGRAM -AND -ARE -IRREVOCABLE -PROVIDED -THE -STATED -CONDITIONS -ARE -MET -THIS -LICENSE -EXPLICITLY -AFFIRMS -YOUR -UNLIMITED -PERMISSION -TO -RUN -THE -UNMODIFIED -PROGRAM -THE -OUTPUT -FROM -RUNNING -A -COVERED -WORK -IS -COVERED -BY -THIS -LICENSE -ONLY -IF -THE -OUTPUT -GIVEN -ITS -CONTENT -CONSTITUTES -A -COVERED -WORK -THIS -LICENSE -ACKNOWLEDGES -YOUR -RIGHTS -OF -FAIR -USE -OR -OTHER -EQUIVALENT -AS -PROVIDED -BY -COPYRIGHT -LAW -YOU -MAY -MAKE -RUN -AND -PROPAGATE -COVERED -WORKS -THAT -YOU -DO -NOT -CONVEY -WITHOUT -CONDITIONS -SO -LONG -AS -YOUR -LICENSE -OTHERWISE -REMAINS -IN -FORCE -YOU -MAY -CONVEY -COVERED -WORKS -TO -OTHERS -FOR -THE -SOLE -PURPOSE -OF -HAVING -THEM -MAKE -MODIFICATIONS -EXCLUSIVELY -FOR -YOU -OR -PROVIDE -YOU -WITH -FACILITIES -FOR -RUNNING -THOSE -WORKS -PROVIDED -THAT -YOU -COMPLY -WITH -THE -TERMS -OF -THIS -LICENSE -IN -CONVEYING -ALL -MATERIAL -FOR -WHICH -YOU -DO -NOT -CONTROL -COPYRIGHT -THOSE -THUS -MAKING -OR -RUNNING -THE -COVERED -WORKS -FOR -YOU -MUST -DO -SO -EXCLUSIVELY -ON -YOUR -BEHALF -UNDER -YOUR -DIRECTION -AND -CONTROL -ON -TERMS -THAT -PROHIBIT -THEM -FROM -MAKING -ANY -COPIES -OF -YOUR -COPYRIGHTED -MATERIAL -OUTSIDE -THEIR -RELATIONSHIP -WITH -YOU -CONVEYING -UNDER -ANY -OTHER -CIRCUMSTANCES -IS -PERMITTED -SOLELY -UNDER -THE -CONDITIONS -STATED -BELOW -SUBLICENSING -IS -NOT -ALLOWED -SECTION -MAKES -IT -UNNECESSARY -PROTECTING -USERS -LEGAL -RIGHTS -FROM -ANTI -CIRCUMVENTION -LAW -NO -COVERED -WORK -SHALL -BE -DEEMED -PART -OF -AN -EFFECTIVE -TECHNOLOGICAL -MEASURE -UNDER -ANY -APPLICABLE -LAW -FULFILLING -OBLIGATIONS -UNDER -ARTICLE -OF -THE -WIPO -COPYRIGHT -TREATY -ADOPTED -ON -DECEMBER -OR -SIMILAR -LAWS -PROHIBITING -OR -RESTRICTING -CIRCUMVENTION -OF -SUCH -MEASURES -WHEN -YOU -CONVEY -A -COVERED -WORK -YOU -WAIVE -ANY -LEGAL -POWER -TO -FORBID -CIRCUMVENTION -OF -TECHNOLOGICAL -MEASURES -TO -THE -EXTENT -SUCH -CIRCUMVENTION -IS -EFFECTED -BY -EXERCISING -RIGHTS -UNDER -THIS -LICENSE -WITH -RESPECT -TO -THE -COVERED -WORK -AND -YOU -DISCLAIM -ANY -INTENTION -TO -LIMIT -OPERATION -OR -MODIFICATION -OF -THE -WORK -AS -A -MEANS -OF -ENFORCING -AGAINST -THE -WORK'S -USERS -YOUR -OR -THIRD -PARTIES -LEGAL -RIGHTS -TO -FORBID -CIRCUMVENTION -OF -TECHNOLOGICAL -MEASURES -CONVEYING -VERBATIM -COPIES -YOU -MAY -CONVEY -VERBATIM -COPIES -OF -THE -PROGRAM'S -SOURCE -CODE -AS -YOU -RECEIVE -IT -IN -ANY -MEDIUM -PROVIDED -THAT -YOU -CONSPICUOUSLY -AND -APPROPRIATELY -PUBLISH -ON -EACH -COPY -AN -APPROPRIATE -COPYRIGHT -NOTICE -KEEP -INTACT -ALL -NOTICES -STATING -THAT -THIS -LICENSE -AND -ANY -NON -PERMISSIVE -TERMS -ADDED -IN -ACCORD -WITH -SECTION -APPLY -TO -THE -CODE -KEEP -INTACT -ALL -NOTICES -OF -THE -ABSENCE -OF -ANY -WARRANTY -AND -GIVE -ALL -RECIPIENTS -A -COPY -OF -THIS -LICENSE -ALONG -WITH -THE -PROGRAM -YOU -MAY -CHARGE -ANY -PRICE -OR -NO -PRICE -FOR -EACH -COPY -THAT -YOU -CONVEY -AND -YOU -MAY -OFFER -SUPPORT -OR -WARRANTY -PROTECTION -FOR -A -FEE -CONVEYING -MODIFIED -SOURCE -VERSIONS -YOU -MAY -CONVEY -A -WORK -BASED -ON -THE -PROGRAM -OR -THE -MODIFICATIONS -TO -PRODUCE -IT -FROM -THE -PROGRAM -IN -THE -FORM -OF -SOURCE -CODE -UNDER -THE -TERMS -OF -SECTION -PROVIDED -THAT -YOU -ALSO -MEET -ALL -OF -THESE -CONDITIONS -A -THE -WORK -MUST -CARRY -PROMINENT -NOTICES -STATING -THAT -YOU -MODIFIED -IT -AND -GIVING -A -RELEVANT -DATE -B -THE -WORK -MUST -CARRY -PROMINENT -NOTICES -STATING -THAT -IT -IS -RELEASED -UNDER -THIS -LICENSE -AND -ANY -CONDITIONS -ADDED -UNDER -SECTION -THIS -REQUIREMENT -MODIFIES -THE -REQUIREMENT -IN -SECTION -TO -KEEP -INTACT -ALL -NOTICES -C -YOU -MUST -LICENSE -THE -ENTIRE -WORK -AS -A -WHOLE -UNDER -THIS -LICENSE -TO -ANYONE -WHO -COMES -INTO -POSSESSION -OF -A -COPY -THIS -LICENSE -WILL -THEREFORE -APPLY -ALONG -WITH -ANY -APPLICABLE -SECTION -ADDITIONAL -TERMS -TO -THE -WHOLE -OF -THE -WORK -AND -ALL -ITS -PARTS -REGARDLESS -OF -HOW -THEY -ARE -PACKAGED -THIS -LICENSE -GIVES -NO -PERMISSION -TO -LICENSE -THE -WORK -IN -ANY -OTHER -WAY -BUT -IT -DOES -NOT -INVALIDATE -SUCH -PERMISSION -IF -YOU -HAVE -SEPARATELY -RECEIVED -IT -D -IF -THE -WORK -HAS -INTERACTIVE -USER -INTERFACES -EACH -MUST -DISPLAY -APPROPRIATE -LEGAL -NOTICES -HOWEVER -IF -THE -PROGRAM -HAS -INTERACTIVE -INTERFACES -THAT -DO -NOT -DISPLAY -APPROPRIATE -LEGAL -NOTICES -YOUR -WORK -NEED -NOT -MAKE -THEM -DO -SO -A -COMPILATION -OF -A -COVERED -WORK -WITH -OTHER -SEPARATE -AND -INDEPENDENT -WORKS -WHICH -ARE -NOT -BY -THEIR -NATURE -EXTENSIONS -OF -THE -COVERED -WORK -AND -WHICH -ARE -NOT -COMBINED -WITH -IT -SUCH -AS -TO -FORM -A -LARGER -PROGRAM -IN -OR -ON -A -VOLUME -OF -A -STORAGE -OR -DISTRIBUTION -MEDIUM -IS -CALLED -AN -AGGREGATE -IF -THE -COMPILATION -AND -ITS -RESULTING -COPYRIGHT -ARE -NOT -USED -TO -LIMIT -THE -ACCESS -OR -LEGAL -RIGHTS -OF -THE -COMPILATION'S -USERS -BEYOND -WHAT -THE -INDIVIDUAL -WORKS -PERMIT -INCLUSION -OF -A -COVERED -WORK -IN -AN -AGGREGATE -DOES -NOT -CAUSE -THIS -LICENSE -TO -APPLY -TO -THE -OTHER -PARTS -OF -THE -AGGREGATE -CONVEYING -NON -SOURCE -FORMS -YOU -MAY -CONVEY -A -COVERED -WORK -IN -OBJECT -CODE -FORM -UNDER -THE -TERMS -OF -SECTIONS -AND -PROVIDED -THAT -YOU -ALSO -CONVEY -THE -MACHINE -READABLE -CORRESPONDING -SOURCE -UNDER -THE -TERMS -OF -THIS -LICENSE -IN -ONE -OF -THESE -WAYS -A -CONVEY -THE -OBJECT -CODE -IN -OR -EMBODIED -IN -A -PHYSICAL -PRODUCT -INCLUDING -A -PHYSICAL -DISTRIBUTION -MEDIUM -ACCOMPANIED -BY -THE -CORRESPONDING -SOURCE -FIXED -ON -A -DURABLE -PHYSICAL -MEDIUM -CUSTOMARILY -USED -FOR -SOFTWARE -INTERCHANGE -B -CONVEY -THE -OBJECT -CODE -IN -OR -EMBODIED -IN -A -PHYSICAL -PRODUCT -INCLUDING -A -PHYSICAL -DISTRIBUTION -MEDIUM -ACCOMPANIED -BY -A -WRITTEN -OFFER -VALID -FOR -AT -LEAST -THREE -YEARS -AND -VALID -FOR -AS -LONG -AS -YOU -OFFER -SPARE -PARTS -OR -CUSTOMER -SUPPORT -FOR -THAT -PRODUCT -MODEL -TO -GIVE -ANYONE -WHO -POSSESSES -THE -OBJECT -CODE -EITHER -A -COPY -OF -THE -CORRESPONDING -SOURCE -FOR -ALL -THE -SOFTWARE -IN -THE -PRODUCT -THAT -IS -COVERED -BY -THIS -LICENSE -ON -A -DURABLE -PHYSICAL -MEDIUM -CUSTOMARILY -USED -FOR -SOFTWARE -INTERCHANGE -FOR -A -PRICE -NO -MORE -THAN -YOUR -REASONABLE -COST -OF -PHYSICALLY -PERFORMING -THIS -CONVEYING -OF -SOURCE -OR -ACCESS -TO -COPY -THE -CORRESPONDING -SOURCE -FROM -A -NETWORK -SERVER -AT -NO -CHARGE -C -CONVEY -INDIVIDUAL -COPIES -OF -THE -OBJECT -CODE -WITH -A -COPY -OF -THE -WRITTEN -OFFER -TO -PROVIDE -THE -CORRESPONDING -SOURCE -THIS -ALTERNATIVE -IS -ALLOWED -ONLY -OCCASIONALLY -AND -NONCOMMERCIALLY -AND -ONLY -IF -YOU -RECEIVED -THE -OBJECT -CODE -WITH -SUCH -AN -OFFER -IN -ACCORD -WITH -SUBSECTION -B -D -CONVEY -THE -OBJECT -CODE -BY -OFFERING -ACCESS -FROM -A -DESIGNATED -PLACE -GRATIS -OR -FOR -A -CHARGE -AND -OFFER -EQUIVALENT -ACCESS -TO -THE -CORRESPONDING -SOURCE -IN -THE -SAME -WAY -THROUGH -THE -SAME -PLACE -AT -NO -FURTHER -CHARGE -YOU -NEED -NOT -REQUIRE -RECIPIENTS -TO -COPY -THE -CORRESPONDING -SOURCE -ALONG -WITH -THE -OBJECT -CODE -IF -THE -PLACE -TO -COPY -THE -OBJECT -CODE -IS -A -NETWORK -SERVER -THE -CORRESPONDING -SOURCE -MAY -BE -ON -A -DIFFERENT -SERVER -OPERATED -BY -YOU -OR -A -THIRD -PARTY -THAT -SUPPORTS -EQUIVALENT -COPYING -FACILITIES -PROVIDED -YOU -MAINTAIN -CLEAR -DIRECTIONS -NEXT -TO -THE -OBJECT -CODE -SAYING -WHERE -TO -FIND -THE -CORRESPONDING -SOURCE -REGARDLESS -OF -WHAT -SERVER -HOSTS -THE -CORRESPONDING -SOURCE -YOU -REMAIN -OBLIGATED -TO -ENSURE -THAT -IT -IS -AVAILABLE -FOR -AS -LONG -AS -NEEDED -TO -SATISFY -THESE -REQUIREMENTS -E -CONVEY -THE -OBJECT -CODE -USING -PEER -TO -PEER -TRANSMISSION -PROVIDED -YOU -INFORM -OTHER -PEERS -WHERE -THE -OBJECT -CODE -AND -CORRESPONDING -SOURCE -OF -THE -WORK -ARE -BEING -OFFERED -TO -THE -GENERAL -PUBLIC -AT -NO -CHARGE -UNDER -SUBSECTION -D -A -SEPARABLE -PORTION -OF -THE -OBJECT -CODE -WHOSE -SOURCE -CODE -IS -EXCLUDED -FROM -THE -CORRESPONDING -SOURCE -AS -A -SYSTEM -LIBRARY -NEED -NOT -BE -INCLUDED -IN -CONVEYING -THE -OBJECT -CODE -WORK -A -USER -PRODUCT -IS -EITHER -A -CONSUMER -PRODUCT -WHICH -MEANS -ANY -TANGIBLE -PERSONAL -PROPERTY -WHICH -IS -NORMALLY -USED -FOR -PERSONAL -FAMILY -OR -HOUSEHOLD -PURPOSES -OR -ANYTHING -DESIGNED -OR -SOLD -FOR -INCORPORATION -INTO -A -DWELLING -IN -DETERMINING -WHETHER -A -PRODUCT -IS -A -CONSUMER -PRODUCT -DOUBTFUL -CASES -SHALL -BE -RESOLVED -IN -FAVOR -OF -COVERAGE -FOR -A -PARTICULAR -PRODUCT -RECEIVED -BY -A -PARTICULAR -USER -NORMALLY -USED -REFERS -TO -A -TYPICAL -OR -COMMON -USE -OF -THAT -CLASS -OF -PRODUCT -REGARDLESS -OF -THE -STATUS -OF -THE -PARTICULAR -USER -OR -OF -THE -WAY -IN -WHICH -THE -PARTICULAR -USER -ACTUALLY -USES -OR -EXPECTS -OR -IS -EXPECTED -TO -USE -THE -PRODUCT -A -PRODUCT -IS -A -CONSUMER -PRODUCT -REGARDLESS -OF -WHETHER -THE -PRODUCT -HAS -SUBSTANTIAL -COMMERCIAL -INDUSTRIAL -OR -NON -CONSUMER -USES -UNLESS -SUCH -USES -REPRESENT -THE -ONLY -SIGNIFICANT -MODE -OF -USE -OF -THE -PRODUCT -INSTALLATION -INFORMATION -FOR -A -USER -PRODUCT -MEANS -ANY -METHODS -PROCEDURES -AUTHORIZATION -KEYS -OR -OTHER -INFORMATION -REQUIRED -TO -INSTALL -AND -EXECUTE -MODIFIED -VERSIONS -OF -A -COVERED -WORK -IN -THAT -USER -PRODUCT -FROM -A -MODIFIED -VERSION -OF -ITS -CORRESPONDING -SOURCE -THE -INFORMATION -MUST -SUFFICE -TO -ENSURE -THAT -THE -CONTINUED -FUNCTIONING -OF -THE -MODIFIED -OBJECT -CODE -IS -IN -NO -CASE -PREVENTED -OR -INTERFERED -WITH -SOLELY -BECAUSE -MODIFICATION -HAS -BEEN -MADE -IF -YOU -CONVEY -AN -OBJECT -CODE -WORK -UNDER -THIS -SECTION -IN -OR -WITH -OR -SPECIFICALLY -FOR -USE -IN -A -USER -PRODUCT -AND -THE -CONVEYING -OCCURS -AS -PART -OF -A -TRANSACTION -IN -WHICH -THE -RIGHT -OF -POSSESSION -AND -USE -OF -THE -USER -PRODUCT -IS -TRANSFERRED -TO -THE -RECIPIENT -IN -PERPETUITY -OR -FOR -A -FIXED -TERM -REGARDLESS -OF -HOW -THE -TRANSACTION -IS -CHARACTERIZED -THE -CORRESPONDING -SOURCE -CONVEYED -UNDER -THIS -SECTION -MUST -BE -ACCOMPANIED -BY -THE -INSTALLATION -INFORMATION -BUT -THIS -REQUIREMENT -DOES -NOT -APPLY -IF -NEITHER -YOU -NOR -ANY -THIRD -PARTY -RETAINS -THE -ABILITY -TO -INSTALL -MODIFIED -OBJECT -CODE -ON -THE -USER -PRODUCT -FOR -EXAMPLE -THE -WORK -HAS -BEEN -INSTALLED -IN -ROM -THE -REQUIREMENT -TO -PROVIDE -INSTALLATION -INFORMATION -DOES -NOT -INCLUDE -A -REQUIREMENT -TO -CONTINUE -TO -PROVIDE -SUPPORT -SERVICE -WARRANTY -OR -UPDATES -FOR -A -WORK -THAT -HAS -BEEN -MODIFIED -OR -INSTALLED -BY -THE -RECIPIENT -OR -FOR -THE -USER -PRODUCT -IN -WHICH -IT -HAS -BEEN -MODIFIED -OR -INSTALLED -ACCESS -TO -A -NETWORK -MAY -BE -DENIED -WHEN -THE -MODIFICATION -ITSELF -MATERIALLY -AND -ADVERSELY -AFFECTS -THE -OPERATION -OF -THE -NETWORK -OR -VIOLATES -THE -RULES -AND -PROTOCOLS -FOR -COMMUNICATION -ACROSS -THE -NETWORK -CORRESPONDING -SOURCE -CONVEYED -AND -INSTALLATION -INFORMATION -PROVIDED -IN -ACCORD -WITH -THIS -SECTION -MUST -BE -IN -A -FORMAT -THAT -IS -PUBLICLY -DOCUMENTED -AND -WITH -AN -IMPLEMENTATION -AVAILABLE -TO -THE -PUBLIC -IN -SOURCE -CODE -FORM -AND -MUST -REQUIRE -NO -SPECIAL -PASSWORD -OR -KEY -FOR -UNPACKING -READING -OR -COPYING -ADDITIONAL -TERMS -ADDITIONAL -PERMISSIONS -ARE -TERMS -THAT -SUPPLEMENT -THE -TERMS -OF -THIS -LICENSE -BY -MAKING -EXCEPTIONS -FROM -ONE -OR -MORE -OF -ITS -CONDITIONS -ADDITIONAL -PERMISSIONS -THAT -ARE -APPLICABLE -TO -THE -ENTIRE -PROGRAM -SHALL -BE -TREATED -AS -THOUGH -THEY -WERE -INCLUDED -IN -THIS -LICENSE -TO -THE -EXTENT -THAT -THEY -ARE -VALID -UNDER -APPLICABLE -LAW -IF -ADDITIONAL -PERMISSIONS -APPLY -ONLY -TO -PART -OF -THE -PROGRAM -THAT -PART -MAY -BE -USED -SEPARATELY -UNDER -THOSE -PERMISSIONS -BUT -THE -ENTIRE -PROGRAM -REMAINS -GOVERNED -BY -THIS -LICENSE -WITHOUT -REGARD -TO -THE -ADDITIONAL -PERMISSIONS -WHEN -YOU -CONVEY -A -COPY -OF -A -COVERED -WORK -YOU -MAY -AT -YOUR -OPTION -REMOVE -ANY -ADDITIONAL -PERMISSIONS -FROM -THAT -COPY -OR -FROM -ANY -PART -OF -IT -ADDITIONAL -PERMISSIONS -MAY -BE -WRITTEN -TO -REQUIRE -THEIR -OWN -REMOVAL -IN -CERTAIN -CASES -WHEN -YOU -MODIFY -THE -WORK -YOU -MAY -PLACE -ADDITIONAL -PERMISSIONS -ON -MATERIAL -ADDED -BY -YOU -TO -A -COVERED -WORK -FOR -WHICH -YOU -HAVE -OR -CAN -GIVE -APPROPRIATE -COPYRIGHT -PERMISSION -NOTWITHSTANDING -ANY -OTHER -PROVISION -OF -THIS -LICENSE -FOR -MATERIAL -YOU -ADD -TO -A -COVERED -WORK -YOU -MAY -IF -AUTHORIZED -BY -THE -COPYRIGHT -HOLDERS -OF -THAT -MATERIAL -SUPPLEMENT -THE -TERMS -OF -THIS -LICENSE -WITH -TERMS -A -DISCLAIMING -WARRANTY -OR -LIMITING -LIABILITY -DIFFERENTLY -FROM -THE -TERMS -OF -SECTIONS -AND -OF -THIS -LICENSE -OR -B -REQUIRING -PRESERVATION -OF -SPECIFIED -REASONABLE -LEGAL -NOTICES -OR -AUTHOR -ATTRIBUTIONS -IN -THAT -MATERIAL -OR -IN -THE -APPROPRIATE -LEGAL -NOTICES -DISPLAYED -BY -WORKS -CONTAINING -IT -OR -C -PROHIBITING -MISREPRESENTATION -OF -THE -ORIGIN -OF -THAT -MATERIAL -OR -REQUIRING -THAT -MODIFIED -VERSIONS -OF -SUCH -MATERIAL -BE -MARKED -IN -REASONABLE -WAYS -AS -DIFFERENT -FROM -THE -ORIGINAL -VERSION -OR -D -LIMITING -THE -USE -FOR -PUBLICITY -PURPOSES -OF -NAMES -OF -LICENSORS -OR -AUTHORS -OF -THE -MATERIAL -OR -E -DECLINING -TO -GRANT -RIGHTS -UNDER -TRADEMARK -LAW -FOR -USE -OF -SOME -TRADE -NAMES -TRADEMARKS -OR -SERVICE -MARKS -OR -F -REQUIRING -INDEMNIFICATION -OF -LICENSORS -AND -AUTHORS -OF -THAT -MATERIAL -BY -ANYONE -WHO -CONVEYS -THE -MATERIAL -OR -MODIFIED -VERSIONS -OF -IT -WITH -CONTRACTUAL -ASSUMPTIONS -OF -LIABILITY -TO -THE -RECIPIENT -FOR -ANY -LIABILITY -THAT -THESE -CONTRACTUAL -ASSUMPTIONS -DIRECTLY -IMPOSE -ON -THOSE -LICENSORS -AND -AUTHORS -ALL -OTHER -NON -PERMISSIVE -ADDITIONAL -TERMS -ARE -CONSIDERED -FURTHER -RESTRICTIONS -WITHIN -THE -MEANING -OF -SECTION -IF -THE -PROGRAM -AS -YOU -RECEIVED -IT -OR -ANY -PART -OF -IT -CONTAINS -A -NOTICE -STATING -THAT -IT -IS -GOVERNED -BY -THIS -LICENSE -ALONG -WITH -A -TERM -THAT -IS -A -FURTHER -RESTRICTION -YOU -MAY -REMOVE -THAT -TERM -IF -A -LICENSE -DOCUMENT -CONTAINS -A -FURTHER -RESTRICTION -BUT -PERMITS -RELICENSING -OR -CONVEYING -UNDER -THIS -LICENSE -YOU -MAY -ADD -TO -A -COVERED -WORK -MATERIAL -GOVERNED -BY -THE -TERMS -OF -THAT -LICENSE -DOCUMENT -PROVIDED -THAT -THE -FURTHER -RESTRICTION -DOES -NOT -SURVIVE -SUCH -RELICENSING -OR -CONVEYING -IF -YOU -ADD -TERMS -TO -A -COVERED -WORK -IN -ACCORD -WITH -THIS -SECTION -YOU -MUST -PLACE -IN -THE -RELEVANT -SOURCE -FILES -A -STATEMENT -OF -THE -ADDITIONAL -TERMS -THAT -APPLY -TO -THOSE -FILES -OR -A -NOTICE -INDICATING -WHERE -TO -FIND -THE -APPLICABLE -TERMS -ADDITIONAL -TERMS -PERMISSIVE -OR -NON -PERMISSIVE -MAY -BE -STATED -IN -THE -FORM -OF -A -SEPARATELY -WRITTEN -LICENSE -OR -STATED -AS -EXCEPTIONS -THE -ABOVE -REQUIREMENTS -APPLY -EITHER -WAY -TERMINATION -YOU -MAY -NOT -PROPAGATE -OR -MODIFY -A -COVERED -WORK -EXCEPT -AS -EXPRESSLY -PROVIDED -UNDER -THIS -LICENSE -ANY -ATTEMPT -OTHERWISE -TO -PROPAGATE -OR -MODIFY -IT -IS -VOID -AND -WILL -AUTOMATICALLY -TERMINATE -YOUR -RIGHTS -UNDER -THIS -LICENSE -INCLUDING -ANY -PATENT -LICENSES -GRANTED -UNDER -THE -THIRD -PARAGRAPH -OF -SECTION -HOWEVER -IF -YOU -CEASE -ALL -VIOLATION -OF -THIS -LICENSE -THEN -YOUR -LICENSE -FROM -A -PARTICULAR -COPYRIGHT -HOLDER -IS -REINSTATED -A -PROVISIONALLY -UNLESS -AND -UNTIL -THE -COPYRIGHT -HOLDER -EXPLICITLY -AND -FINALLY -TERMINATES -YOUR -LICENSE -AND -B -PERMANENTLY -IF -THE -COPYRIGHT -HOLDER -FAILS -TO -NOTIFY -YOU -OF -THE -VIOLATION -BY -SOME -REASONABLE -MEANS -PRIOR -TO -DAYS -AFTER -THE -CESSATION -MOREOVER -YOUR -LICENSE -FROM -A -PARTICULAR -COPYRIGHT -HOLDER -IS -REINSTATED -PERMANENTLY -IF -THE -COPYRIGHT -HOLDER -NOTIFIES -YOU -OF -THE -VIOLATION -BY -SOME -REASONABLE -MEANS -THIS -IS -THE -FIRST -TIME -YOU -HAVE -RECEIVED -NOTICE -OF -VIOLATION -OF -THIS -LICENSE -FOR -ANY -WORK -FROM -THAT -COPYRIGHT -HOLDER -AND -YOU -CURE -THE -VIOLATION -PRIOR -TO -DAYS -AFTER -YOUR -RECEIPT -OF -THE -NOTICE -TERMINATION -OF -YOUR -RIGHTS -UNDER -THIS -SECTION -DOES -NOT -TERMINATE -THE -LICENSES -OF -PARTIES -WHO -HAVE -RECEIVED -COPIES -OR -RIGHTS -FROM -YOU -UNDER -THIS -LICENSE -IF -YOUR -RIGHTS -HAVE -BEEN -TERMINATED -AND -NOT -PERMANENTLY -REINSTATED -YOU -DO -NOT -QUALIFY -TO -RECEIVE -NEW -LICENSES -FOR -THE -SAME -MATERIAL -UNDER -SECTION -ACCEPTANCE -NOT -REQUIRED -FOR -HAVING -COPIES -YOU -ARE -NOT -REQUIRED -TO -ACCEPT -THIS -LICENSE -IN -ORDER -TO -RECEIVE -OR -RUN -A -COPY -OF -THE -PROGRAM -ANCILLARY -PROPAGATION -OF -A -COVERED -WORK -OCCURRING -SOLELY -AS -A -CONSEQUENCE -OF -USING -PEER -TO -PEER -TRANSMISSION -TO -RECEIVE -A -COPY -LIKEWISE -DOES -NOT -REQUIRE -ACCEPTANCE -HOWEVER -NOTHING -OTHER -THAN -THIS -LICENSE -GRANTS -YOU -PERMISSION -TO -PROPAGATE -OR -MODIFY -ANY -COVERED -WORK -THESE -ACTIONS -INFRINGE -COPYRIGHT -IF -YOU -DO -NOT -ACCEPT -THIS -LICENSE -THEREFORE -BY -MODIFYING -OR -PROPAGATING -A -COVERED -WORK -YOU -INDICATE -YOUR -ACCEPTANCE -OF -THIS -LICENSE -TO -DO -SO -AUTOMATIC -LICENSING -OF -DOWNSTREAM -RECIPIENTS -EACH -TIME -YOU -CONVEY -A -COVERED -WORK -THE -RECIPIENT -AUTOMATICALLY -RECEIVES -A -LICENSE -FROM -THE -ORIGINAL -LICENSORS -TO -RUN -MODIFY -AND -PROPAGATE -THAT -WORK -SUBJECT -TO -THIS -LICENSE -YOU -ARE -NOT -RESPONSIBLE -FOR -ENFORCING -COMPLIANCE -BY -THIRD -PARTIES -WITH -THIS -LICENSE -AN -ENTITY -TRANSACTION -IS -A -TRANSACTION -TRANSFERRING -CONTROL -OF -AN -ORGANIZATION -OR -SUBSTANTIALLY -ALL -ASSETS -OF -ONE -OR -SUBDIVIDING -AN -ORGANIZATION -OR -MERGING -ORGANIZATIONS -IF -PROPAGATION -OF -A -COVERED -WORK -RESULTS -FROM -AN -ENTITY -TRANSACTION -EACH -PARTY -TO -THAT -TRANSACTION -WHO -RECEIVES -A -COPY -OF -THE -WORK -ALSO -RECEIVES -WHATEVER -LICENSES -TO -THE -WORK -THE -PARTY'S -PREDECESSOR -IN -INTEREST -HAD -OR -COULD -GIVE -UNDER -THE -PREVIOUS -PARAGRAPH -PLUS -A -RIGHT -TO -POSSESSION -OF -THE -CORRESPONDING -SOURCE -OF -THE -WORK -FROM -THE -PREDECESSOR -IN -INTEREST -IF -THE -PREDECESSOR -HAS -IT -OR -CAN -GET -IT -WITH -REASONABLE -EFFORTS -YOU -MAY -NOT -IMPOSE -ANY -FURTHER -RESTRICTIONS -ON -THE -EXERCISE -OF -THE -RIGHTS -GRANTED -OR -AFFIRMED -UNDER -THIS -LICENSE -FOR -EXAMPLE -YOU -MAY -NOT -IMPOSE -A -LICENSE -FEE -ROYALTY -OR -OTHER -CHARGE -FOR -EXERCISE -OF -RIGHTS -GRANTED -UNDER -THIS -LICENSE -AND -YOU -MAY -NOT -INITIATE -LITIGATION -INCLUDING -A -CROSS -CLAIM -OR -COUNTERCLAIM -IN -A -LAWSUIT -ALLEGING -THAT -ANY -PATENT -CLAIM -IS -INFRINGED -BY -MAKING -USING -SELLING -OFFERING -FOR -SALE -OR -IMPORTING -THE -PROGRAM -OR -ANY -PORTION -OF -IT -PATENTS -A -CONTRIBUTOR -IS -A -COPYRIGHT -HOLDER -WHO -AUTHORIZES -USE -UNDER -THIS -LICENSE -OF -THE -PROGRAM -OR -A -WORK -ON -WHICH -THE -PROGRAM -IS -BASED -THE -WORK -THUS -LICENSED -IS -CALLED -THE -CONTRIBUTOR'S -CONTRIBUTOR -VERSION -A -CONTRIBUTOR'S -ESSENTIAL -PATENT -CLAIMS -ARE -ALL -PATENT -CLAIMS -OWNED -OR -CONTROLLED -BY -THE -CONTRIBUTOR -WHETHER -ALREADY -ACQUIRED -OR -HEREAFTER -ACQUIRED -THAT -WOULD -BE -INFRINGED -BY -SOME -MANNER -PERMITTED -BY -THIS -LICENSE -OF -MAKING -USING -OR -SELLING -ITS -CONTRIBUTOR -VERSION -BUT -DO -NOT -INCLUDE -CLAIMS -THAT -WOULD -BE -INFRINGED -ONLY -AS -A -CONSEQUENCE -OF -FURTHER -MODIFICATION -OF -THE -CONTRIBUTOR -VERSION -FOR -PURPOSES -OF -THIS -DEFINITION -CONTROL -INCLUDES -THE -RIGHT -TO -GRANT -PATENT -SUBLICENSES -IN -A -MANNER -CONSISTENT -WITH -THE -REQUIREMENTS -OF -THIS -LICENSE -EACH -CONTRIBUTOR -GRANTS -YOU -A -NON -EXCLUSIVE -WORLDWIDE -ROYALTY -FREE -PATENT -LICENSE -UNDER -THE -CONTRIBUTOR'S -ESSENTIAL -PATENT -CLAIMS -TO -MAKE -USE -SELL -OFFER -FOR -SALE -IMPORT -AND -OTHERWISE -RUN -MODIFY -AND -PROPAGATE -THE -CONTENTS -OF -ITS -CONTRIBUTOR -VERSION -IN -THE -FOLLOWING -THREE -PARAGRAPHS -A -PATENT -LICENSE -IS -ANY -EXPRESS -AGREEMENT -OR -COMMITMENT -HOWEVER -DENOMINATED -NOT -TO -ENFORCE -A -PATENT -SUCH -AS -AN -EXPRESS -PERMISSION -TO -PRACTICE -A -PATENT -OR -COVENANT -NOT -TO -SUE -FOR -PATENT -INFRINGEMENT -TO -GRANT -SUCH -A -PATENT -LICENSE -TO -A -PARTY -MEANS -TO -MAKE -SUCH -AN -AGREEMENT -OR -COMMITMENT -NOT -TO -ENFORCE -A -PATENT -AGAINST -THE -PARTY -IF -YOU -CONVEY -A -COVERED -WORK -KNOWINGLY -RELYING -ON -A -PATENT -LICENSE -AND -THE -CORRESPONDING -SOURCE -OF -THE -WORK -IS -NOT -AVAILABLE -FOR -ANYONE -TO -COPY -FREE -OF -CHARGE -AND -UNDER -THE -TERMS -OF -THIS -LICENSE -THROUGH -A -PUBLICLY -AVAILABLE -NETWORK -SERVER -OR -OTHER -READILY -ACCESSIBLE -MEANS -THEN -YOU -MUST -EITHER -CAUSE -THE -CORRESPONDING -SOURCE -TO -BE -SO -AVAILABLE -OR -ARRANGE -TO -DEPRIVE -YOURSELF -OF -THE -BENEFIT -OF -THE -PATENT -LICENSE -FOR -THIS -PARTICULAR -WORK -OR -ARRANGE -IN -A -MANNER -CONSISTENT -WITH -THE -REQUIREMENTS -OF -THIS -LICENSE -TO -EXTEND -THE -PATENT -LICENSE -TO -DOWNSTREAM -RECIPIENTS -KNOWINGLY -RELYING -MEANS -YOU -HAVE -ACTUAL -KNOWLEDGE -THAT -BUT -FOR -THE -PATENT -LICENSE -YOUR -CONVEYING -THE -COVERED -WORK -IN -A -COUNTRY -OR -YOUR -RECIPIENT'S -USE -OF -THE -COVERED -WORK -IN -A -COUNTRY -WOULD -INFRINGE -ONE -OR -MORE -IDENTIFIABLE -PATENTS -IN -THAT -COUNTRY -THAT -YOU -HAVE -REASON -TO -BELIEVE -ARE -VALID -IF -PURSUANT -TO -OR -IN -CONNECTION -WITH -A -SINGLE -TRANSACTION -OR -ARRANGEMENT -YOU -CONVEY -OR -PROPAGATE -BY -PROCURING -CONVEYANCE -OF -A -COVERED -WORK -AND -GRANT -A -PATENT -LICENSE -TO -SOME -OF -THE -PARTIES -RECEIVING -THE -COVERED -WORK -AUTHORIZING -THEM -TO -USE -PROPAGATE -MODIFY -OR -CONVEY -A -SPECIFIC -COPY -OF -THE -COVERED -WORK -THEN -THE -PATENT -LICENSE -YOU -GRANT -IS -AUTOMATICALLY -EXTENDED -TO -ALL -RECIPIENTS -OF -THE -COVERED -WORK -AND -WORKS -BASED -ON -IT -A -PATENT -LICENSE -IS -DISCRIMINATORY -IF -IT -DOES -NOT -INCLUDE -WITHIN -THE -SCOPE -OF -ITS -COVERAGE -PROHIBITS -THE -EXERCISE -OF -OR -IS -CONDITIONED -ON -THE -NON -EXERCISE -OF -ONE -OR -MORE -OF -THE -RIGHTS -THAT -ARE -SPECIFICALLY -GRANTED -UNDER -THIS -LICENSE -YOU -MAY -NOT -CONVEY -A -COVERED -WORK -IF -YOU -ARE -A -PARTY -TO -AN -ARRANGEMENT -WITH -A -THIRD -PARTY -THAT -IS -IN -THE -BUSINESS -OF -DISTRIBUTING -SOFTWARE -UNDER -WHICH -YOU -MAKE -PAYMENT -TO -THE -THIRD -PARTY -BASED -ON -THE -EXTENT -OF -YOUR -ACTIVITY -OF -CONVEYING -THE -WORK -AND -UNDER -WHICH -THE -THIRD -PARTY -GRANTS -TO -ANY -OF -THE -PARTIES -WHO -WOULD -RECEIVE -THE -COVERED -WORK -FROM -YOU -A -DISCRIMINATORY -PATENT -LICENSE -A -IN -CONNECTION -WITH -COPIES -OF -THE -COVERED -WORK -CONVEYED -BY -YOU -OR -COPIES -MADE -FROM -THOSE -COPIES -OR -B -PRIMARILY -FOR -AND -IN -CONNECTION -WITH -SPECIFIC -PRODUCTS -OR -COMPILATIONS -THAT -CONTAIN -THE -COVERED -WORK -UNLESS -YOU -ENTERED -INTO -THAT -ARRANGEMENT -OR -THAT -PATENT -LICENSE -WAS -GRANTED -PRIOR -TO -MARCH -NOTHING -IN -THIS -LICENSE -SHALL -BE -CONSTRUED -AS -EXCLUDING -OR -LIMITING -ANY -IMPLIED -LICENSE -OR -OTHER -DEFENSES -TO -INFRINGEMENT -THAT -MAY -OTHERWISE -BE -AVAILABLE -TO -YOU -UNDER -APPLICABLE -PATENT -LAW -NO -SURRENDER -OF -OTHERS -FREEDOM -IF -CONDITIONS -ARE -IMPOSED -ON -YOU -WHETHER -BY -COURT -ORDER -AGREEMENT -OR -OTHERWISE -THAT -CONTRADICT -THE -CONDITIONS -OF -THIS -LICENSE -THEY -DO -NOT -EXCUSE -YOU -FROM -THE -CONDITIONS -OF -THIS -LICENSE -IF -YOU -CANNOT -CONVEY -A -COVERED -WORK -SO -AS -TO -SATISFY -SIMULTANEOUSLY -YOUR -OBLIGATIONS -UNDER -THIS -LICENSE -AND -ANY -OTHER -PERTINENT -OBLIGATIONS -THEN -AS -A -CONSEQUENCE -YOU -MAY -NOT -CONVEY -IT -AT -ALL -FOR -EXAMPLE -IF -YOU -AGREE -TO -TERMS -THAT -OBLIGATE -YOU -TO -COLLECT -A -ROYALTY -FOR -FURTHER -CONVEYING -FROM -THOSE -TO -WHOM -YOU -CONVEY -THE -PROGRAM -THE -ONLY -WAY -YOU -COULD -SATISFY -BOTH -THOSE -TERMS -AND -THIS -LICENSE -WOULD -BE -TO -REFRAIN -ENTIRELY -FROM -CONVEYING -THE -PROGRAM -REMOTE -NETWORK -INTERACTION -USE -WITH -THE -GNU -GENERAL -PUBLIC -LICENSE -NOTWITHSTANDING -ANY -OTHER -PROVISION -OF -THIS -LICENSE -IF -YOU -MODIFY -THE -PROGRAM -YOUR -MODIFIED -VERSION -MUST -PROMINENTLY -OFFER -ALL -USERS -INTERACTING -WITH -IT -REMOTELY -THROUGH -A -COMPUTER -NETWORK -IF -YOUR -VERSION -SUPPORTS -SUCH -INTERACTION -AN -OPPORTUNITY -TO -RECEIVE -THE -CORRESPONDING -SOURCE -OF -YOUR -VERSION -BY -PROVIDING -ACCESS -TO -THE -CORRESPONDING -SOURCE -FROM -A -NETWORK -SERVER -AT -NO -CHARGE -THROUGH -SOME -STANDARD -OR -CUSTOMARY -MEANS -OF -FACILITATING -COPYING -OF -SOFTWARE -THIS -CORRESPONDING -SOURCE -SHALL -INCLUDE -THE -CORRESPONDING -SOURCE -FOR -ANY -WORK -COVERED -BY -VERSION -OF -THE -GNU -GENERAL -PUBLIC -LICENSE -THAT -IS -INCORPORATED -PURSUANT -TO -THE -FOLLOWING -PARAGRAPH -NOTWITHSTANDING -ANY -OTHER -PROVISION -OF -THIS -LICENSE -YOU -HAVE -PERMISSION -TO -LINK -OR -COMBINE -ANY -COVERED -WORK -WITH -A -WORK -LICENSED -UNDER -VERSION -OF -THE -GNU -GENERAL -PUBLIC -LICENSE -INTO -A -SINGLE -COMBINED -WORK -AND -TO -CONVEY -THE -RESULTING -WORK -THE -TERMS -OF -THIS -LICENSE -WILL -CONTINUE -TO -APPLY -TO -THE -PART -WHICH -IS -THE -COVERED -WORK -BUT -THE -WORK -WITH -WHICH -IT -IS -COMBINED -WILL -REMAIN -GOVERNED -BY -VERSION -OF -THE -GNU -GENERAL -PUBLIC -LICENSE -REVISED -VERSIONS -OF -THIS -LICENSE -THE -FREE -SOFTWARE -FOUNDATION -MAY -PUBLISH -REVISED -AND -OR -NEW -VERSIONS -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -FROM -TIME -TO -TIME -SUCH -NEW -VERSIONS -WILL -BE -SIMILAR -IN -SPIRIT -TO -THE -PRESENT -VERSION -BUT -MAY -DIFFER -IN -DETAIL -TO -ADDRESS -NEW -PROBLEMS -OR -CONCERNS -EACH -VERSION -IS -GIVEN -A -DISTINGUISHING -VERSION -NUMBER -IF -THE -PROGRAM -SPECIFIES -THAT -A -CERTAIN -NUMBERED -VERSION -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -OR -ANY -LATER -VERSION -APPLIES -TO -IT -YOU -HAVE -THE -OPTION -OF -FOLLOWING -THE -TERMS -AND -CONDITIONS -EITHER -OF -THAT -NUMBERED -VERSION -OR -OF -ANY -LATER -VERSION -PUBLISHED -BY -THE -FREE -SOFTWARE -FOUNDATION -IF -THE -PROGRAM -DOES -NOT -SPECIFY -A -VERSION -NUMBER -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -YOU -MAY -CHOOSE -ANY -VERSION -EVER -PUBLISHED -BY -THE -FREE -SOFTWARE -FOUNDATION -IF -THE -PROGRAM -SPECIFIES -THAT -A -PROXY -CAN -DECIDE -WHICH -FUTURE -VERSIONS -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -CAN -BE -USED -THAT -PROXY'S -PUBLIC -STATEMENT -OF -ACCEPTANCE -OF -A -VERSION -PERMANENTLY -AUTHORIZES -YOU -TO -CHOOSE -THAT -VERSION -FOR -THE -PROGRAM -LATER -LICENSE -VERSIONS -MAY -GIVE -YOU -ADDITIONAL -OR -DIFFERENT -PERMISSIONS -HOWEVER -NO -ADDITIONAL -OBLIGATIONS -ARE -IMPOSED -ON -ANY -AUTHOR -OR -COPYRIGHT -HOLDER -AS -A -RESULT -OF -YOUR -CHOOSING -TO -FOLLOW -A -LATER -VERSION -DISCLAIMER -OF -WARRANTY -THERE -IS -NO -WARRANTY -FOR -THE -PROGRAM -TO -THE -EXTENT -PERMITTED -BY -APPLICABLE -LAW -EXCEPT -WHEN -OTHERWISE -STATED -IN -WRITING -THE -COPYRIGHT -HOLDERS -AND -OR -OTHER -PARTIES -PROVIDE -THE -PROGRAM -AS -IS -WITHOUT -WARRANTY -OF -ANY -KIND -EITHER -EXPRESSED -OR -IMPLIED -INCLUDING -BUT -NOT -LIMITED -TO -THE -IMPLIED -WARRANTIES -OF -MERCHANTABILITY -AND -FITNESS -FOR -A -PARTICULAR -PURPOSE -THE -ENTIRE -RISK -AS -TO -THE -QUALITY -AND -PERFORMANCE -OF -THE -PROGRAM -IS -WITH -YOU -SHOULD -THE -PROGRAM -PROVE -DEFECTIVE -YOU -ASSUME -THE -COST -OF -ALL -NECESSARY -SERVICING -REPAIR -OR -CORRECTION -LIMITATION -OF -LIABILITY -IN -NO -EVENT -UNLESS -REQUIRED -BY -APPLICABLE -LAW -OR -AGREED -TO -IN -WRITING -WILL -ANY -COPYRIGHT -HOLDER -OR -ANY -OTHER -PARTY -WHO -MODIFIES -AND -OR -CONVEYS -THE -PROGRAM -AS -PERMITTED -ABOVE -BE -LIABLE -TO -YOU -FOR -DAMAGES -INCLUDING -ANY -GENERAL -SPECIAL -INCIDENTAL -OR -CONSEQUENTIAL -DAMAGES -ARISING -OUT -OF -THE -USE -OR -INABILITY -TO -USE -THE -PROGRAM -INCLUDING -BUT -NOT -LIMITED -TO -LOSS -OF -DATA -OR -DATA -BEING -RENDERED -INACCURATE -OR -LOSSES -SUSTAINED -BY -YOU -OR -THIRD -PARTIES -OR -A -FAILURE -OF -THE -PROGRAM -TO -OPERATE -WITH -ANY -OTHER -PROGRAMS -EVEN -IF -SUCH -HOLDER -OR -OTHER -PARTY -HAS -BEEN -ADVISED -OF -THE -POSSIBILITY -OF -SUCH -DAMAGES -INTERPRETATION -OF -SECTIONS -AND -IF -THE -DISCLAIMER -OF -WARRANTY -AND -LIMITATION -OF -LIABILITY -PROVIDED -ABOVE -CANNOT -BE -GIVEN -LOCAL -LEGAL -EFFECT -ACCORDING -TO -THEIR -TERMS -REVIEWING -COURTS -SHALL -APPLY -LOCAL -LAW -THAT -MOST -CLOSELY -APPROXIMATES -AN -ABSOLUTE -WAIVER -OF -ALL -CIVIL -LIABILITY -IN -CONNECTION -WITH -THE -PROGRAM -UNLESS -A -WARRANTY -OR -ASSUMPTION -OF -LIABILITY -ACCOMPANIES -A -COPY -OF -THE -PROGRAM -IN -RETURN -FOR -A -FEE -END -OF -TERMS -AND -CONDITIONS -HOW -TO -APPLY -THESE -TERMS -TO -YOUR -NEW -PROGRAMS -IF -YOU -DEVELOP -A -NEW -PROGRAM -AND -YOU -WANT -IT -TO -BE -OF -THE -GREATEST -POSSIBLE -USE -TO -THE -PUBLIC -THE -BEST -WAY -TO -ACHIEVE -THIS -IS -TO -MAKE -IT -FREE -SOFTWARE -WHICH -EVERYONE -CAN -REDISTRIBUTE -AND -CHANGE -UNDER -THESE -TERMS -TO -DO -SO -ATTACH -THE -FOLLOWING -NOTICES -TO -THE -PROGRAM -IT -IS -SAFEST -TO -ATTACH -THEM -TO -THE -START -OF -EACH -SOURCE -FILE -TO -MOST -EFFECTIVELY -STATE -THE -EXCLUSION -OF -WARRANTY -AND -EACH -FILE -SHOULD -HAVE -AT -LEAST -THE -COPYRIGHT -LINE -AND -A -POINTER -TO -WHERE -THE -FULL -NOTICE -IS -FOUND -ONE -LINE -TO -GIVE -THE -PROGRAM'S -NAME -AND -A -BRIEF -IDEA -OF -WHAT -IT -DOES -COPYRIGHT -C -YEAR -NAME -OF -AUTHOR -THIS -PROGRAM -IS -FREE -SOFTWARE -YOU -CAN -REDISTRIBUTE -IT -AND -OR -MODIFY -IT -UNDER -THE -TERMS -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -AS -PUBLISHED -BY -THE -FREE -SOFTWARE -FOUNDATION -EITHER -VERSION -OF -THE -LICENSE -OR -AT -YOUR -OPTION -ANY -LATER -VERSION -THIS -PROGRAM -IS -DISTRIBUTED -IN -THE -HOPE -THAT -IT -WILL -BE -USEFUL -BUT -WITHOUT -ANY -WARRANTY -WITHOUT -EVEN -THE -IMPLIED -WARRANTY -OF -MERCHANTABILITY -OR -FITNESS -FOR -A -PARTICULAR -PURPOSE -SEE -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -FOR -MORE -DETAILS -YOU -SHOULD -HAVE -RECEIVED -A -COPY -OF -THE -GNU -AFFERO -GENERAL -PUBLIC -LICENSE -ALONG -WITH -THIS -PROGRAM -IF -NOT -SEE -HTTPS -WWW -GNU -ORG -LICENSES -ALSO -ADD -INFORMATION -ON -HOW -TO -CONTACT -YOU -BY -ELECTRONIC -AND -PAPER -MAIL -IF -YOUR -SOFTWARE -CAN -INTERACT -WITH -USERS -REMOTELY -THROUGH -A -COMPUTER -NETWORK -YOU -SHOULD -ALSO -MAKE -SURE -THAT -IT -PROVIDES -A -WAY -FOR -USERS -TO -GET -ITS -SOURCE -FOR -EXAMPLE -IF -YOUR -PROGRAM -IS -A -WEB -APPLICATION -ITS -INTERFACE -COULD -DISPLAY -A -SOURCE -LINK -THAT -LEADS -USERS -TO -AN -ARCHIVE -OF -THE -CODE -THERE -ARE -MANY -WAYS -YOU -COULD -OFFER -SOURCE -AND -DIFFERENT -SOLUTIONS -WILL -BE -BETTER -FOR -DIFFERENT -PROGRAMS -SEE -SECTION -FOR -THE -SPECIFIC -REQUIREMENTS -YOU -SHOULD -ALSO -GET -YOUR -EMPLOYER -IF -YOU -WORK -AS -A -PROGRAMMER -OR -SCHOOL -IF -ANY -TO -SIGN -A -COPYRIGHT -DISCLAIMER -FOR -THE -PROGRAM -IF -NECESSARY -FOR -MORE -INFORMATION -ON -THIS -AND -HOW -TO -APPLY -AND -FOLLOW -THE -GNU -AGPL -SEE -HTTPS -WWW -GNU -ORG -LICENSES