Skip to content

Commit

Permalink
feat: added GRPC config (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-exp authored Jul 3, 2024
1 parent 603b4f7 commit 8ea0e2d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions utils/grpc/GrpcConfig.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package grpc

import "github.com/caarlos0/env"

type Configuration struct {
KubelinkMaxRecvMsgSize int `env:"KUBELINK_GRPC_MAX_RECEIVE_MSG_SIZE" envDefault:"20"` // In mb
KubelinkMaxSendMsgSize int `env:"KUBELINK_GRPC_MAX_SEND_MSG_SIZE" envDefault:"4"` // In mb
}

func GetConfiguration() (*Configuration, error) {
cfg := &Configuration{}
err := env.Parse(cfg)
return cfg, err
}

0 comments on commit 8ea0e2d

Please sign in to comment.