...

Source file src/solace.dev/go/messaging/pkg/solace/config/doc.go

Documentation: solace.dev/go/messaging/pkg/solace/config

     1  // pubsubplus-go-client
     2  //
     3  // Copyright 2021-2024 Solace Corporation. All rights reserved.
     4  //
     5  // Licensed under the Apache License, Version 2.0 (the "License");
     6  // you may not use this file except in compliance with the License.
     7  // You may obtain a copy of the License at
     8  //
     9  // http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS,
    13  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  // See the License for the specific language governing permissions and
    15  // limitations under the License.
    16  
    17  // Package config contains the following  constructs used for configuration:
    18  //
    19  // - a set of keys that can be used to configure a variety of messaging services,
    20  // such as a solace.MessagingService, solace.DirectMessageReceiver, etc.
    21  //
    22  // - a set of strategies that can be used to configure various features on
    23  // various builders, such as Kerberos authentication on a MessagingServiceBuilder and
    24  // Replay on a PersistentMessageReceiver.
    25  //
    26  // - a collection of map types that represent a valid configuration that can be passed
    27  // to a builder.
    28  //
    29  // For the various maps, such as a ServicePropertyMap, the configuration may be loaded
    30  // as JSON as shown:
    31  //
    32  //	import "encoding/json"
    33  //
    34  //	...
    35  //
    36  //	var myJsonConfig []byte := []byte(`{"solace":{"messaging":{"transport":{"host":"10.10.10.10"}}}}`)
    37  //	var myServicePropertyMap config.ServicePropertyMap
    38  //	json.Unmarshal(myJsonConfig, &myServicePropertyMap)
    39  //	messaging.NewMessagingServiceBuilder().FromConfigurationProvider(myServicePropertyMap)
    40  //	...
    41  package config
    42