implement grpc weather
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build and Publish / release (push) Successful in 4m42s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build and Publish / release (push) Successful in 4m42s
				
			This commit is contained in:
		
							
								
								
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					.git
 | 
				
			||||||
 | 
					config.y*ml
 | 
				
			||||||
 | 
					go.work*
 | 
				
			||||||
 | 
					docker-compose-sample*
 | 
				
			||||||
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -26,5 +26,7 @@ go.work.sum
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
bin/*
 | 
					bin/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config.yaml
 | 
					config.y*ml
 | 
				
			||||||
docker-compose.yml
 | 
					docker-compose.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.vscode
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										26
									
								
								docker-compose-sample.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								docker-compose-sample.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					name: Ambient Local Exporter
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  ambient-local-exporter:
 | 
				
			||||||
 | 
					    build: .
 | 
				
			||||||
 | 
					    ports:
 | 
				
			||||||
 | 
					      - 8080:8080
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - ./config.yaml:/app/config.yaml
 | 
				
			||||||
 | 
					    command:
 | 
				
			||||||
 | 
					      - -config
 | 
				
			||||||
 | 
					      - /app/config.yaml
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      APP_NAME: ambient-local-exporter
 | 
				
			||||||
 | 
					      APP_LOG_LEVEL: debug ## For testing only
 | 
				
			||||||
 | 
					      APP_LOG_FORMAT: json ## console, json
 | 
				
			||||||
 | 
					      APP_LOG_TIME_FORMAT: rfc3339 ## long, short, unix, rfc3339, off
 | 
				
			||||||
 | 
					      APP_HTTP_LISTEN: 0.0.0.0:8080
 | 
				
			||||||
 | 
					      APP_HTTP_READ_TIMEOUT: 10s
 | 
				
			||||||
 | 
					      APP_HTTP_WRITE_TIMEOUT: 10s
 | 
				
			||||||
 | 
					      APP_HTTP_IDLE_TIMEOUT: 30s
 | 
				
			||||||
 | 
					      APP_HTTP_LOG_REQUESTS: true
 | 
				
			||||||
 | 
					      APP_OTEL_STDOUT_ENABLED: false
 | 
				
			||||||
 | 
					      APP_OTEL_METRIC_INTERVAL_SECS: 30
 | 
				
			||||||
 | 
					      OTEL_EXPORTER_OTLP_ENDPOINT: https://otel.libretechconsulting.com:4317 # Set to your otel collector
 | 
				
			||||||
 | 
					      OTEL_SERVICE_NAME: ambient-local-exporter
 | 
				
			||||||
 | 
					      OTEL_RESOURCE_ATTRIBUTES: "env=development,service.version=(devel)"
 | 
				
			||||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@@ -3,7 +3,7 @@ module gitea.libretechconsulting.com/rmcguire/ambient-local-exporter
 | 
				
			|||||||
go 1.23.4
 | 
					go 1.23.4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require (
 | 
					require (
 | 
				
			||||||
	gitea.libretechconsulting.com/rmcguire/go-app v0.6.2
 | 
						gitea.libretechconsulting.com/rmcguire/go-app v0.6.3
 | 
				
			||||||
	github.com/go-resty/resty/v2 v2.16.5
 | 
						github.com/go-resty/resty/v2 v2.16.5
 | 
				
			||||||
	github.com/gorilla/schema v1.4.1
 | 
						github.com/gorilla/schema v1.4.1
 | 
				
			||||||
	github.com/rs/zerolog v1.33.0
 | 
						github.com/rs/zerolog v1.33.0
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.sum
									
									
									
									
									
								
							@@ -2,6 +2,8 @@ gitea.libretechconsulting.com/rmcguire/go-app v0.6.0 h1:XIqk2xpKZ+GzCyh3ZpST93nu
 | 
				
			|||||||
gitea.libretechconsulting.com/rmcguire/go-app v0.6.0/go.mod h1:S3/vdMEiRWWIdD0Fr+tjJc627VzxNzO4Ia2HgTBXe+g=
 | 
					gitea.libretechconsulting.com/rmcguire/go-app v0.6.0/go.mod h1:S3/vdMEiRWWIdD0Fr+tjJc627VzxNzO4Ia2HgTBXe+g=
 | 
				
			||||||
gitea.libretechconsulting.com/rmcguire/go-app v0.6.2 h1:vpEdZu7WI8qIil5NLf6OUF/Tk8+3txZ7fTv1NRRnOoc=
 | 
					gitea.libretechconsulting.com/rmcguire/go-app v0.6.2 h1:vpEdZu7WI8qIil5NLf6OUF/Tk8+3txZ7fTv1NRRnOoc=
 | 
				
			||||||
gitea.libretechconsulting.com/rmcguire/go-app v0.6.2/go.mod h1:S3/vdMEiRWWIdD0Fr+tjJc627VzxNzO4Ia2HgTBXe+g=
 | 
					gitea.libretechconsulting.com/rmcguire/go-app v0.6.2/go.mod h1:S3/vdMEiRWWIdD0Fr+tjJc627VzxNzO4Ia2HgTBXe+g=
 | 
				
			||||||
 | 
					gitea.libretechconsulting.com/rmcguire/go-app v0.6.3 h1:dXYHJxK/1vmWBj1wqbqEUncFt3O92agy9gNWoa9NpA0=
 | 
				
			||||||
 | 
					gitea.libretechconsulting.com/rmcguire/go-app v0.6.3/go.mod h1:S3/vdMEiRWWIdD0Fr+tjJc627VzxNzO4Ia2HgTBXe+g=
 | 
				
			||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 | 
					github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 | 
				
			||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 | 
					github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 | 
				
			||||||
github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA=
 | 
					github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA=
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								pkg/weather/grpc/weather.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								pkg/weather/grpc/weather.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					package grpc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"context"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pb "gitea.libretechconsulting.com/rmcguire/ambient-local-exporter/api/v1alpha1/weather"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO: Implement
 | 
				
			||||||
 | 
					type GRPCWeather struct {
 | 
				
			||||||
 | 
						ctx context.Context
 | 
				
			||||||
 | 
						*pb.UnimplementedAmbientLocalWeatherServiceServer
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user