This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: demo-dev-svc | |
namespace: demo-dev | |
spec: | |
selector: | |
app: demo | |
ports: | |
- protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: demo-dp | |
labels: | |
app: demo | |
namespace: demo-dev | |
spec: | |
replicas: 2 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: planit-dev-secret | |
namespace: planit-dev | |
data: | |
DATASOURCE_PRIMARY_URL: amRiYzptYXJpYWRi | |
DATASOURCE_USERNAME: cGx | |
DATASOURCE_SECRET: Ubl0MCE= | |
# 등등.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple example of ClusterConfig object: | |
--- | |
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: ${ekscluster_name} | |
region: ${AWS_REGION} | |
version: "${eks_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: "2010-09-09" | |
Description: "Amazon EKS Sample VPC - 3 AZ, Private 3 subnets, Public 3 subnets, 1 IGW, 3 NATGateways, Public RT, 3 Private RT, Security Group for ControlPlane " | |
Metadata: | |
AWS::CloudFormation::Interface: | |
ParameterGroups: | |
- Label: | |
default: "Worker Network Configuration" | |
Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package benchmarks | |
import ( | |
"net" | |
"sync" | |
) | |
type Server struct { | |
l net.Listener | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func New() { | |
router = chi.NewRoter() | |
//.. | |
router.Mount("/api", http.HandlerFunc(mux.ServeHTTP)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) { | |
s.handlers[meth] = append([]handler{{pat: pat, h: h}}, s.handlers[meth]...) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminClient) error { | |
mux.Handle("POST", pattern_Admin_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | |
// http request (body, path parameter, query parameter 등)를 Proto Message로 변환해 | |
// 매핑된 gRPC Service 함수를 호출해요. | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |
//.. | |
// ServeMux의 handler를 하나씩 순회해요. | |
for _, h := range s.handlers[r.Method] { | |
// http.Request를 통해 알맞은 endpoint에 등록된 | |
// handler를 찾아 아래 request를 handle하게 해요. | |
h.h(w, r, pathParams) | |
} | |
} |
NewerOlder