github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/archive/config_test.go (about) 1 // Copyright (C) 2021-2022 Talos, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package archive 16 17 import ( 18 "flag" 19 20 "github.com/lirm/aeron-go/aeron" 21 ) 22 23 // TestConfig defaults 24 var TestConfig = struct { 25 AuthEnabled *bool 26 AuthCredentials *string 27 AuthChallenge *string 28 AuthResponse *string 29 SampleStream *int 30 SampleChannel *string 31 ReplayStream *int 32 ReplayChannel *string 33 AeronPrefix *string 34 ProfilerEnabled *bool 35 Debug *bool 36 }{ 37 flag.Bool("authenabled", false, "enable authentication"), 38 // Credentials requiring a challenge 39 flag.String("authcredentials", "admin:adminC", "credentials to use for connection"), 40 flag.String("authchallenge", "challenge!", "challenge to use for connection"), 41 flag.String("authresponse", "admin:CSadmin", "challenge response for authentication"), 42 43 flag.Int("samplestream", 1001, "default response control stream to use"), 44 flag.String("samplechannel", "aeron:udp?endpoint=localhost:20121", "default response control channel to publish to"), 45 46 flag.Int("replaystream", 1002, "default base replay stream to use"), 47 flag.String("replaychannel", "aeron:udp?endpoint=localhost:20121", "default replay to receive from"), 48 49 flag.String("prefix", aeron.DefaultAeronDir+"/aeron-"+aeron.UserName, "root directory for aeron driver file"), 50 flag.Bool("profile", false, "enable CPU profiling"), 51 flag.Bool("debug", false, "enable DEBUG logging"), 52 }