-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
28 lines (22 loc) · 807 Bytes
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Copyright IBM Corp. 2017 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package config
import (
cb "github.com/hyperledger/fabric/protos/common"
)
// Config encapsulates config (channel or resource) tree
type Config interface {
// ConfigProto returns the current config
ConfigProto() *cb.Config
// ProposeConfigUpdate attempts to validate a new configtx against the current config state
ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)
}
// Manager provides access to the resource config
type Manager interface {
// GetChannelConfig defines methods that are related to channel configuration
GetChannelConfig(channel string) Config
// GetResourceConfig defines methods that are related to resource configuration
GetResourceConfig(channel string) Config
}