본문 바로가기
728x90
반응형

분류 전체보기186

[Go] grpc connection timeout 추가 grpc connection timeout을 추가하기 1. Dial 사용 Dial은 주어진 주소로 client connection을 생성합니다. Dial 함수의 구현부를 보면 DialContext를 호출하기 때문에 Dial 함수는 deprecated되었고 DialContext를 통해 구현하는것이 좋습니다. // Dial 구현부 func Dial(target string, opts ...DialOption) (*ClientConn, error) { return DialContext(context.Background(), target, opts...) } grpc.WithTimeout 사용 connection, err := grpc.Dial(address, grpc.WithInsecure(), grpc.Wi.. 2022. 5. 23.
[kubernetes][redis] kubernetes에 redis 간단 설치 kubernetes에서 redis 간단 설치하기 redis.yaml 을 생성한 후 서비스 구동에 필요한 svc, configmap, pod을 정의한다. apiVersion: v1 kind: ConfigMap metadata: name: redis-config data: redis-config: | maxmemory 20mb maxmemory-policy allkeys-lru --- apiVersion: v1 kind: Service metadata: name: redis labels: app: redis spec: selector: app: redis ports: - name: redis protocol: TCP port: 6379 targetPort: 6379 --- apiVersion: v1 kind.. 2022. 5. 23.
[git] git branch 이름 변경 git 작업을 하다보면 git branch 이름 변경이 필요한 경우가 있다. 그럴경우 아래와 같은 방법으로 git branch 명을 변경 할 수 있다. Local Branch 이름 변경 방법 -m 옵션을 통해 Local Branch의 이름을 변경 할 수 있다. $ git branch -m {new_branch_name} Remote Branch 이름 변경 방법 변경된 Local Branch를 Remote에 push해서 변경한다. $ git push origin -u {new_branch_name} 이후 이전 브랜치를 delete 한다. $git push origin --delete {old_branch_name} 2022. 5. 20.
[docker-compose] docker-compose force build docker-copose up 을 이용하여 container 구동 시 일반적으론 캐시를 사용하여 container가 구동된다. 이때 강제로 build를 하고 싶으면 아래 옵션을 추가하면 build를 진행 후 구동이 된다. $ docker-compose up -d --build 2022. 5. 20.
728x90
반응형