Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for readBootstrapToJSON (0.3 sec)

  1. pkg/envoy/proxy_test.go

    		t.Errorf("envoyArgs() => got:\n%v,\nwant:\n%v", got, want)
    	}
    }
    
    func TestReadToJSON(t *testing.T) {
    	got, err := readBootstrapToJSON("testdata/bootstrap.yaml")
    	if err != nil {
    		t.Errorf("unexpected error: %v", err)
    	}
    	want := `{"key":"value"}`
    	if got != want {
    		t.Errorf("readBootstrapToJSON() => got:\n%v,\nwant:\n%v", got, want)
    	}
    }
    
    func TestSplitComponentLog(t *testing.T) {
    	cases := []struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 11:45:51 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. pkg/envoy/proxy.go

    		startupArgs = append(startupArgs, "--concurrency", fmt.Sprint(e.Concurrency))
    	}
    
    	return startupArgs
    }
    
    var HostIP = os.Getenv("HOST_IP")
    
    // readBootstrapToJSON reads a config file, in YAML or JSON, and returns JSON string
    func readBootstrapToJSON(fname string) (string, error) {
    	b, err := os.ReadFile(fname)
    	if err != nil {
    		return "", fmt.Errorf("failed to read file: %s, %v", fname, err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 05 10:02:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top