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
@Override | |
public void stop() throws Exception { | |
super.stop(); | |
scheduledExecutorService.shutdownNow(); | |
} |
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 javafx.application.Application; | |
import javafx.application.Platform; | |
import javafx.scene.Scene; | |
import javafx.scene.chart.CategoryAxis; | |
import javafx.scene.chart.LineChart; | |
import javafx.scene.chart.NumberAxis; | |
import javafx.scene.chart.XYChart; | |
import javafx.stage.Stage; | |
import java.text.SimpleDateFormat; |
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 ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
type Data struct { |
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 ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
type DataEvent struct { |
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 ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
type DataEvent struct { |
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
id: # ID of API | |
providerName: admin # Provider name for API [required] | |
apiName: SwaggerPetstore # Name of the API without Spaces(see publisher UI for more) [required] | |
version: 1.0.0 # Version of API(required) | |
description: 'This is a sample server Petstore server.' # Description of API | |
type: HTTP # Type of API {HTTP|WS} [required] | |
context: /v2 # Context of API with a leading slash, CLI tool will append version on import(if you want to put version like /1.0.0/v2 just set context to /{version}/v2 please refer UI for this) [required] | |
tags: # tags for API as a list | |
- pets | |
- petstore |
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
environments: # Define environments as a list | |
- name: dev # Name of the environment | |
gatewayEnvironments: # define gateway environments | |
- "Production and Sandbox" # List gateways | |
- "Another Gateway" | |
certs: # define certificates for endpoints as a list | |
- hostName: 'https://dev.wso2.com' # hostname for the certificate | |
alias: 'Dev Certificate' # Alias for the certificate | |
path: '~/certs/dev.pem' # path to public certificate file | |
endpoints: # Define endpoints for environment |
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
// define default values, other resources in default package | |
package defaults | |
var ConfigTemplate = []byte(` | |
// content goes here | |
`) | |
// In some another package | |
func somefunc(){ | |
ioutil.WriteFile("/path/to/dest", defaults.ConfigTemplate, os.ModePerm) | |
} |
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
//go:generate go run gen.go | |
package box | |
type resourceBox struct { | |
storage map[string][]byte | |
} | |
func newResourceBox() *resourceBox { | |
return &resourceBox{storage: make(map[string][]byte)} |
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
resources := make(map[string][]byte) | |
err := filepath.Walk("resources", func(path string, info os.FileInfo, err error) error { | |
if err != nil { | |
log.Println("Error :", err) | |
return err | |
} | |
relativePath := filepath.ToSlash(strings.TrimPrefix(path, "resources")) | |
if info.IsDir() { | |
log.Println(path, "is a directory, skipping...") | |
return nil |