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
#!/usr/bin/env node | |
import * as fs from "fs"; | |
import {writeFile} from "fs/promises"; | |
import {configuration} from "../config/config"; | |
const tarToZip = require('tar-to-zip'); | |
const downloadGoffFromGitHubRelease = async (tag: string, destinationPath: string, repoSlug: string, templatedFileName: string): Promise<string> => { | |
const version = tag.replace('v', ''); | |
const fileName = templatedFileName.replace('{version}', 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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/google/go-github/v63/github" | |
"os" | |
"strings" | |
) |
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
listen: 1031 | |
pollingInterval: 1000 | |
startWithRetrieverError: false | |
retriever: | |
kind: http | |
url: https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.goff.yaml | |
exporter: | |
kind: log | |
enableSwagger: true |
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
import time | |
from gofeatureflag_python_provider.provider import GoFeatureFlagProvider | |
from gofeatureflag_python_provider.options import GoFeatureFlagOptions | |
from openfeature import api | |
from openfeature.evaluation_context import EvaluationContext | |
from gofeatureflag_python_provider.provider_status import ProviderStatus | |
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
retriever: | |
kind: github # type of retriever we are using | |
repositorySlug: thomaspoignant/demo-goff # repository we are retrieving | |
path: flags.yaml # location of the file in the repository | |
pollingInterval: 5000 # Time in milliseconds we wait before trying to check for changes |
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
basePath: / | |
definitions: | |
model.FlagEval: | |
properties: | |
value: {} | |
type: object | |
model.HealthResponse: | |
properties: | |
initialized: | |
description: Set to true if the HTTP server is started |
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
# sort the stages | |
out_degree_map = {v: d for v, d in g.out_degree() if d > 0} | |
zero_out_degree = [v for v, d in g.out_degree() if d == 0] | |
while zero_out_degree: | |
yield zero_out_degree | |
new_zero_out_degree = [] | |
for v in zero_out_degree: | |
for child, _ in g.in_edges(v): | |
out_degree_map[child] -= 1 | |
if not out_degree_map[child]: |
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
from typing import Dict, List, Optional | |
import networkx as nx | |
def main(): | |
stages = { | |
"Lint": [], | |
"Test": [], | |
"Coverage": ["Test"], | |
"Docs": ["Coverage", "Lint"], |
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
/** | |
test-flag: | |
rule: (role eq "devops") and (env eq "pro") and (key eq "[email protected]") and (company eq "go-feature-flag") | |
percentage: 100 | |
true: true | |
false: false | |
default: false | |
*/ | |
user := ffuser.NewUserBuilder("[email protected]"). |
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
docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack | |
# create topic | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sns create-topic --name responseTopic | |
# list topic and get ARN | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sns list-topics | |
# create SQS queue | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sqs create-queue --queue-name test-queue |
NewerOlder