github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/archive/examples/examplesconfig.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 examples
    16  
    17  import (
    18  	"flag"
    19  
    20  	"github.com/lirm/aeron-go/aeron"
    21  )
    22  
    23  // Config defaults
    24  var Config = struct {
    25  	RequestStream   *int
    26  	RequestChannel  *string
    27  	ResponseStream  *int
    28  	ResponseChannel *string
    29  	SampleStream    *int
    30  	SampleChannel   *string
    31  	MdcChannel      *string
    32  	AeronPrefix     *string
    33  	ProfilerEnabled *bool
    34  	DriverTimeout   *int64
    35  	Messages        *int
    36  	Payload         *int
    37  	Verbose         *bool
    38  }{
    39  	flag.Int("requeststream", 10, "default request control stream to use"),
    40  	flag.String("requestchannel", "aeron:udp?endpoint=localhost:8010", "default request control channel to publish to"),
    41  	flag.Int("responsestream", 21, "default response control stream to use"),
    42  	flag.String("responsechannel", "aeron:udp?endpoint=localhost:0", "default response control channel to publish to"),
    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  	flag.String("mdcchannel", "aeron:udp?control=localhost:20121", "default response control channel to publish to"),
    46  	flag.String("prefix", aeron.DefaultAeronDir+"/aeron-"+aeron.UserName, "root directory for aeron driver file"),
    47  	flag.Bool("profile", false, "enable CPU profiling"),
    48  	flag.Int64("timeout", 10000, "driver liveliness timeout in ms"),
    49  	flag.Int("messages", 100, "number of messages to send/receive"),
    50  	flag.Int("payload", 256, "messages size"),
    51  	flag.Bool("verbose", false, "enable debug logging"),
    52  }