Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Yuriy Panarin PxyUp

🎯
Focusing
Block or report user

Report or block PxyUp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PxyUp
PxyUp / server.go
Last active Dec 16, 2019
server.go
View server.go
package main
import (
"context"
"fmt"
"google.golang.org/grpc"
"net"
agentPb "github.com/squzy/squzy_generated/generated/agent/proto/v1"
"time"
)
@PxyUp
PxyUp / health.go
Created Oct 9, 2019
Health handler
View health.go
package health
import (
"github.com/gin-gonic/gin"
"net/http"
)
func Health(appName string) func(c *gin.Context){
return func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
@PxyUp
PxyUp / BUILD
Created Oct 9, 2019
Shared Health handler build
View BUILD
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "health",
srcs = ["health.go"],
importpath = "go_monogrepo/packages/shared/handlers/health",
visibility = ["//visibility:public"],
deps = [
"@com_github_gin_gonic_gin//:go_default_library"
]
)
@PxyUp
PxyUp / BUILD
Created Oct 9, 2019
Build file for router in main_app
View BUILD
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "router",
srcs = ["router.go"],
importpath = "go_monogrepo/packages/main_app/router",
visibility = ["//visibility:public"],
deps = [
"//packages/shared/handlers/health:health",
"@com_github_gin_gonic_gin//:go_default_library"
]
@PxyUp
PxyUp / router.go
Created Oct 9, 2019
Router in main app
View router.go
package router
import (
"github.com/gin-gonic/gin"
"go_monogrepo/packages/shared/handlers/health"
)
func GetEngine() *gin.Engine {
r := gin.New()
r.Use(gin.Recovery())
@PxyUp
PxyUp / BUILD
Created Oct 9, 2019
Application BUILD
View BUILD
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test")
go_binary(
name = "main_app",
srcs = ["main.go"],
importpath = "go_monogrepo/packages/main",
deps = [
"//packages/main_app/router:router"
],
)
go_test(
@PxyUp
PxyUp / BUILD
Created Oct 9, 2019
BUILD file
View BUILD
load("@bazel_gazelle//:def.bzl", "gazelle")
gazelle(name = "gazelle")
@PxyUp
PxyUp / WORKSPACE
Created Oct 9, 2019
WORKSPACE file
View WORKSPACE
workspace(name = "go_monorepo")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
urls = [
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz",
],
@PxyUp
PxyUp / if.ts
Last active Apr 26, 2019
fasterDom If
View if.ts
import { createComponent, Component, rValue, bootstrap} from 'revact';
class Comp extends Component {
reactive = {
show: rValue(true),
text: rValue("Here timer")
}
get show() {
return this.reactive.show;
View react.jsx
render() {
const cond = true;
return {
<div>
{ cond ? <Component/> : (null) }
</div>
}
}
You can’t perform that action at this time.